mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 06:05:56 +00:00
Merge pull request #2537 from open-sausages/pulls/4/myisam
InnoDB FULLTEXT compat in tests
This commit is contained in:
commit
b3848bf85e
@ -13,6 +13,11 @@ class DatabaseSearchEngineTest extends SapphireTest
|
|||||||
{
|
{
|
||||||
protected $usesDatabase = true;
|
protected $usesDatabase = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var bool InnoDB doesn't update indexes until transactions are committed
|
||||||
|
*/
|
||||||
|
protected $usesTransactions = false;
|
||||||
|
|
||||||
public static function setUpBeforeClass()
|
public static function setUpBeforeClass()
|
||||||
{
|
{
|
||||||
parent::setUpBeforeClass();
|
parent::setUpBeforeClass();
|
||||||
@ -46,20 +51,4 @@ class DatabaseSearchEngineTest extends SapphireTest
|
|||||||
$results->First()->Title
|
$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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -44,6 +44,11 @@ class ZZZSearchFormTest extends FunctionalTest
|
|||||||
*/
|
*/
|
||||||
protected $mockController;
|
protected $mockController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var bool InnoDB doesn't update indexes until transactions are committed
|
||||||
|
*/
|
||||||
|
protected $usesTransactions = false;
|
||||||
|
|
||||||
public function waitUntilIndexingFinished()
|
public function waitUntilIndexingFinished()
|
||||||
{
|
{
|
||||||
$schema = DB::get_schema();
|
$schema = DB::get_schema();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user