mirror of
https://github.com/silverstripe/silverstripe-fulltextsearch
synced 2024-10-22 14:05:29 +02:00
25 lines
703 B
PHP
25 lines
703 B
PHP
<?php
|
|
|
|
namespace SilverStripe\FullTextSearch\Tests\SolrReindexTest;
|
|
|
|
use SilverStripe\Core\Injector\Injector;
|
|
use SilverStripe\Dev\SapphireTest;
|
|
use SilverStripe\FullTextSearch\Search\Extensions\DisableIndexingOnFileMigration;
|
|
use SilverStripe\FullTextSearch\Search\Updaters\SearchUpdater;
|
|
|
|
/**
|
|
* Logger for recording messages for later retrieval
|
|
*/
|
|
class DisableIndexingOnFileMigrationTest extends SapphireTest
|
|
{
|
|
|
|
public function testPreFileMigration()
|
|
{
|
|
$this->assertTrue(SearchUpdater::config()->get('enabled'));
|
|
|
|
Injector::inst()->get(DisableIndexingOnFileMigration::class)->preFileMigration();
|
|
|
|
$this->assertFalse(SearchUpdater::config()->get('enabled'));
|
|
}
|
|
}
|