mirror of
https://github.com/silverstripe/silverstripe-fulltextsearch
synced 2024-10-22 14:05:29 +02:00
FIX Update setUpBeforeClass and illegal_extensions
This commit is contained in:
parent
a47d5e8a8e
commit
6ecf8439af
@ -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();
|
||||||
|
@ -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();
|
||||||
|
@ -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();
|
||||||
|
@ -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
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user