mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX #5557 Tests with no DB requirements wont create test DB
This commit is contained in:
parent
0a67052d6c
commit
8382685034
@ -223,13 +223,9 @@ class SapphireTest extends PHPUnit_Framework_TestCase {
|
|||||||
$this->model = DataModel::inst();
|
$this->model = DataModel::inst();
|
||||||
|
|
||||||
// Set up fixture
|
// Set up fixture
|
||||||
if($fixtureFile || $this->usesDatabase || !self::using_temp_db()) {
|
if($fixtureFile || $this->usesDatabase) {
|
||||||
if(substr(DB::getConn()->currentDatabase(), 0, strlen($prefix) + 5)
|
if (!self::using_temp_db()) {
|
||||||
!= strtolower(sprintf('%stmpdb', $prefix))) {
|
|
||||||
|
|
||||||
//echo "Re-creating temp database... ";
|
|
||||||
self::create_temp_db();
|
self::create_temp_db();
|
||||||
//echo "done.\n";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
singleton('DataObject')->flushCache();
|
singleton('DataObject')->flushCache();
|
||||||
|
Loading…
Reference in New Issue
Block a user