mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
Merge pull request #36 from silverstripe-scienceninjas/pull/fix-searchformtest
MINOR Fixed unittest to use the correct way of setting up Fulltextsearch
This commit is contained in:
commit
1a32520ae1
@ -12,18 +12,6 @@ class SearchFormTest extends FunctionalTest {
|
|||||||
|
|
||||||
protected $mockController;
|
protected $mockController;
|
||||||
|
|
||||||
protected $requiredExtensions = array(
|
|
||||||
"SiteTree" => array(
|
|
||||||
"FulltextSearchable('Title,MenuTitle,Content,MetaTitle,MetaDescription,MetaKeywords')",
|
|
||||||
),
|
|
||||||
"File" => array(
|
|
||||||
"FulltextSearchable('Filename,Title,Content')",
|
|
||||||
),
|
|
||||||
"ContentController" => array(
|
|
||||||
"ContentControllerSearchExtension",
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
function waitUntilIndexingFinished() {
|
function waitUntilIndexingFinished() {
|
||||||
$db = DB::getConn();
|
$db = DB::getConn();
|
||||||
if (method_exists($db, 'waitUntilIndexingFinished')) DB::getConn()->waitUntilIndexingFinished();
|
if (method_exists($db, 'waitUntilIndexingFinished')) DB::getConn()->waitUntilIndexingFinished();
|
||||||
@ -34,7 +22,7 @@ class SearchFormTest extends FunctionalTest {
|
|||||||
if(is_a(DB::getConn(), 'PostgreSQLDatabase')) {
|
if(is_a(DB::getConn(), 'PostgreSQLDatabase')) {
|
||||||
self::kill_temp_db();
|
self::kill_temp_db();
|
||||||
}
|
}
|
||||||
|
FulltextSearchable::enable();
|
||||||
parent::setUpOnce();
|
parent::setUpOnce();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user