FIX Update setUpBeforeClass and illegal_extensions

This commit is contained in:
Robbie Averill 2017-12-05 09:34:12 +13:00
parent a47d5e8a8e
commit 6ecf8439af
4 changed files with 16 additions and 12 deletions

View File

@ -15,10 +15,12 @@ use SilverStripe\FullTextSearch\Search\Processors\SearchUpdateQueuedJobProcessor
use SilverStripe\FullTextSearch\Search\Processors\SearchUpdateBatchedProcessor; use SilverStripe\FullTextSearch\Search\Processors\SearchUpdateBatchedProcessor;
use SilverStripe\FullTextSearch\Search\Updaters\SearchUpdater; use SilverStripe\FullTextSearch\Search\Updaters\SearchUpdater;
use SilverStripe\FullTextSearch\Search\Variants\SearchVariantVersioned; use SilverStripe\FullTextSearch\Search\Variants\SearchVariantVersioned;
use SilverStripe\Subsites\Extensions\SiteTreeSubsites;
use SilverStripe\Subsites\Model\Subsite;
use SilverStripe\ORM\FieldType\DBDatetime; use SilverStripe\ORM\FieldType\DBDatetime;
use SilverStripe\Versioned\Versioned; use SilverStripe\Versioned\Versioned;
use Symbiote\QueuedJobs\Services\QueuedJob;
use Symbiote\QueuedJobs\Services\QueuedJobService; use Symbiote\QueuedJobs\Services\QueuedJobService;
use Symbiote\QueuedJobs\Services\QueuedJob;
/** /**
* Tests {@see SearchUpdateQueuedJobProcessor} * Tests {@see SearchUpdateQueuedJobProcessor}
@ -29,9 +31,9 @@ class BatchedProcessorTest extends SapphireTest
protected $oldProcessor; protected $oldProcessor;
protected static $extra_dataobjects = array( protected static $extra_dataobjects = [
BatchedProcessorTest_Object::class BatchedProcessorTest_Object::class,
); ];
protected static $illegal_extensions = [ protected static $illegal_extensions = [
SiteTree::class => [ SiteTree::class => [
@ -203,7 +205,9 @@ class BatchedProcessorTest extends SapphireTest
*/ */
public function testSoftCap() public function testSoftCap()
{ {
$this->markTestSkipped('@todo This test passes in isolation, but not in conjunction with the previous test'); $this->markTestSkipped(
'@todo PostgreSQL: This test passes in isolation, but not in conjunction with the previous test'
);
$index = singleton(BatchedProcessorTest_Index::class); $index = singleton(BatchedProcessorTest_Index::class);
$index->reset(); $index->reset();

View File

@ -31,9 +31,9 @@ class SearchVariantSubsiteTest extends SapphireTest
self::$index = singleton(static::class); self::$index = singleton(static::class);
} }
Config::inst()->update('Injector', 'SearchUpdateProcessor', array( Config::inst()->update(Injector::class, SearchUpdateProcessor::class, [
'class' => 'SearchUpdateImmediateProcessor' 'class' => SearchUpdateImmediateProcessor::class
)); ]);
FullTextSearch::force_index_list(self::$index); FullTextSearch::force_index_list(self::$index);
SearchUpdater::clear_dirty_indexes(); SearchUpdater::clear_dirty_indexes();

View File

@ -55,9 +55,9 @@ class SolrIndexSubsitesTest extends SapphireTest
self::$index = singleton(SolrIndexSubsitesTest_Index::class); self::$index = singleton(SolrIndexSubsitesTest_Index::class);
} }
Config::modify()->set('Injector', 'SearchUpdateProcessor', array( Config::modify()->set(Injector::class, SearchUpdateProcessor::class, [
'class' => 'SearchUpdateImmediateProcessor' 'class' => SearchUpdateImmediateProcessor::class,
)); ]);
FullTextSearch::force_index_list(self::$index); FullTextSearch::force_index_list(self::$index);
SearchUpdater::clear_dirty_indexes(); SearchUpdater::clear_dirty_indexes();

View File

@ -46,7 +46,7 @@ class SolrIndexVersionedTest extends SapphireTest
self::$index = singleton(SolrVersionedTest_Index::class); self::$index = singleton(SolrVersionedTest_Index::class);
} }
Config::modify()->set(Injector::class, SearchUpdateProcessor::class, array( Config::modify()->set(Injector::class, SearchUpdateProcessor::class, [
'class' => SearchUpdateImmediateProcessor::class 'class' => SearchUpdateImmediateProcessor::class
]); ]);