diff --git a/dev/SapphireTest.php b/dev/SapphireTest.php index 4f9db1b04..b91286929 100644 --- a/dev/SapphireTest.php +++ b/dev/SapphireTest.php @@ -226,13 +226,9 @@ class SapphireTest extends PHPUnit_Framework_TestCase { $this->model = DataModel::inst(); // Set up fixture - if($fixtureFile || $this->usesDatabase || !self::using_temp_db()) { - if(substr(DB::get_conn()->getSelectedDatabase(), 0, strlen($prefix) + 5) - != strtolower(sprintf('%stmpdb', $prefix))) { - - //echo "Re-creating temp database... "; + if($fixtureFile || $this->usesDatabase) { + if (!self::using_temp_db()) { self::create_temp_db(); - //echo "done.\n"; } singleton('DataObject')->flushCache();