FIX Remove searchEngine() test that's using API wrong

Required to allow InnoDB usage, see https://github.com/silverstripe/silverstripe-framework/pull/9454.

This came up in https://github.com/silverstripe/silverstripe-cms/issues/1452, and wasn't fully addressed.
Either we allow boolean mode and all the constraints this brings around special character usage,
or we filter out those special characters, which makes boolean mode pointless.
You can't just pass arbitrary user input in a power-user function like this.
See https://dev.mysql.com/doc/refman/5.6/en/fulltext-boolean.html

Context: This used to work for some examples like "foo>*" under MyISAM,
presumably because it had a more lenient parser. InnoDB rightfully complains about this now.
This commit is contained in:
Ingo Schommer 2020-04-08 14:52:39 +12:00
parent e81659344c
commit dd839ca2d9
1 changed files with 0 additions and 15 deletions

View File

@ -47,19 +47,4 @@ class DatabaseSearchEngineTest extends SapphireTest
);
}
/**
* 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);
}
}