From 5addb0054e15e7b530ee02d5b5e02f687fa1e241 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Tue, 8 Nov 2011 11:27:25 +1300 Subject: [PATCH] MINOR: Fixed SearchFormTest to run last, and to recreate the test database so that MyISAM tables are used. --- tests/search/SearchFormTest.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/search/SearchFormTest.php b/tests/search/SearchFormTest.php index 45d682a3..75c970e8 100644 --- a/tests/search/SearchFormTest.php +++ b/tests/search/SearchFormTest.php @@ -5,8 +5,10 @@ * * @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 + * + * 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'; @@ -19,10 +21,11 @@ class SearchFormTest extends FunctionalTest { function setUpOnce() { // HACK Postgres doesn't refresh TSearch indexes when the schema changes after CREATE TABLE - if(is_a(DB::getConn(), 'PostgreSQLDatabase')) { - self::kill_temp_db(); - } + // MySQL will need a different table type + self::kill_temp_db(); FulltextSearchable::enable(); + self::create_temp_db(); + $this->resetDBSchema(true); parent::setUpOnce(); }