mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +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 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')) {
|
||||
// MySQL will need a different table type
|
||||
self::kill_temp_db();
|
||||
}
|
||||
FulltextSearchable::enable();
|
||||
self::create_temp_db();
|
||||
$this->resetDBSchema(true);
|
||||
parent::setUpOnce();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user