Merge pull request #2537 from open-sausages/pulls/4/myisam

InnoDB FULLTEXT compat in tests
This commit is contained in:
Robbie Averill 2020-04-08 17:21:19 -07:00 committed by GitHub
commit b3848bf85e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 16 deletions

View File

@ -13,6 +13,11 @@ class DatabaseSearchEngineTest extends SapphireTest
{
protected $usesDatabase = true;
/**
* @var bool InnoDB doesn't update indexes until transactions are committed
*/
protected $usesTransactions = false;
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
@ -46,20 +51,4 @@ class DatabaseSearchEngineTest extends SapphireTest
$results->First()->Title
);
}
/**
* Validate that https://github.com/silverstripe/silverstripe-cms/issues/1452 is fixed
*/
public function testSearchEngineEscapeGreaterThan()
{
$page = new SiteTree();
$page->Title = "Unrelated page";
$page->write();
$page->doPublish();
$results = DB::get_conn()->searchEngine([ SiteTree::class, File::class ], "foo>*", 0, 100, "\"Relevance\" DESC", "", true);
// We're not trying to match this query, just confirm that it successfully executes
$this->assertCount(0, $results);
}
}

View File

@ -44,6 +44,11 @@ class ZZZSearchFormTest extends FunctionalTest
*/
protected $mockController;
/**
* @var bool InnoDB doesn't update indexes until transactions are committed
*/
protected $usesTransactions = false;
public function waitUntilIndexingFinished()
{
$schema = DB::get_schema();