mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-09-28 20:29:20 +02:00
MINOR: Fixed SearchFormTest to run last, and to recreate the test database so that MyISAM tables are used.
This commit is contained in:
parent
1a32520ae1
commit
5addb0054e
@ -5,8 +5,10 @@
|
|||||||
*
|
*
|
||||||
* @todo Fix unpublished pages check in testPublishedPagesMatchedByTitle()
|
* @todo Fix unpublished pages check in testPublishedPagesMatchedByTitle()
|
||||||
* @todo All tests run on unpublished pages at the moment, due to the searchform not distinguishing between them
|
* @todo All tests run on unpublished pages at the moment, due to the searchform not distinguishing between them
|
||||||
|
*
|
||||||
|
* Because this manipulates the test database in severe ways, I've renamed the test to force it to run last...
|
||||||
*/
|
*/
|
||||||
class SearchFormTest extends FunctionalTest {
|
class ZZZSearchFormTest extends FunctionalTest {
|
||||||
|
|
||||||
static $fixture_file = 'SearchFormTest.yml';
|
static $fixture_file = 'SearchFormTest.yml';
|
||||||
|
|
||||||
@ -19,10 +21,11 @@ class SearchFormTest extends FunctionalTest {
|
|||||||
|
|
||||||
function setUpOnce() {
|
function setUpOnce() {
|
||||||
// HACK Postgres doesn't refresh TSearch indexes when the schema changes after CREATE TABLE
|
// HACK Postgres doesn't refresh TSearch indexes when the schema changes after CREATE TABLE
|
||||||
if(is_a(DB::getConn(), 'PostgreSQLDatabase')) {
|
// MySQL will need a different table type
|
||||||
self::kill_temp_db();
|
self::kill_temp_db();
|
||||||
}
|
|
||||||
FulltextSearchable::enable();
|
FulltextSearchable::enable();
|
||||||
|
self::create_temp_db();
|
||||||
|
$this->resetDBSchema(true);
|
||||||
parent::setUpOnce();
|
parent::setUpOnce();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user