mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-30 05:09:06 +02:00
Address feedback
This commit is contained in:
parent
1d06dcdd28
commit
cbdf547c1b
@ -166,7 +166,7 @@ class FixtureTestState implements TestState
|
|||||||
$this->loadFixture($fixtureFile, $test);
|
$this->loadFixture($fixtureFile, $test);
|
||||||
}
|
}
|
||||||
// Flag as loaded
|
// Flag as loaded
|
||||||
$this->loaded[get_class($test)] = true;
|
$this->loaded[strtolower(get_class($test))] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -265,7 +265,8 @@ class FixtureTestState implements TestState
|
|||||||
*/
|
*/
|
||||||
protected function resetFixtureFactory($class)
|
protected function resetFixtureFactory($class)
|
||||||
{
|
{
|
||||||
$this->fixtureFactories[strtolower($class)] = Injector::inst()->create(FixtureFactory::class);
|
$class = strtolower($class);
|
||||||
|
$this->fixtureFactories[$class] = Injector::inst()->create(FixtureFactory::class);
|
||||||
$this->loaded[$class] = false;
|
$this->loaded[$class] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -277,6 +278,6 @@ class FixtureTestState implements TestState
|
|||||||
*/
|
*/
|
||||||
protected function getIsLoaded($class)
|
protected function getIsLoaded($class)
|
||||||
{
|
{
|
||||||
return !empty($this->loaded[$class]);
|
return !empty($this->loaded[strtolower($class)]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -676,7 +676,7 @@ abstract class Database
|
|||||||
public function transactionDepth()
|
public function transactionDepth()
|
||||||
{
|
{
|
||||||
// Placeholder error for transactional DBs that don't expose depth
|
// Placeholder error for transactional DBs that don't expose depth
|
||||||
if ($this->supportsTransactions()) {
|
if (!$this->supportsTransactions()) {
|
||||||
user_error(get_class($this) . " does not support transactionDepth", E_USER_WARNING);
|
user_error(get_class($this) . " does not support transactionDepth", E_USER_WARNING);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -360,10 +360,7 @@ class MySQLDatabase extends Database
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
--$this->transactionNesting;
|
--$this->transactionNesting;
|
||||||
if ($this->transactionNesting <= 0) {
|
|
||||||
$this->transactionNesting = 0;
|
|
||||||
$this->query('COMMIT AND ' . ($chain ? '' : 'NO ') . 'CHAIN');
|
$this->query('COMMIT AND ' . ($chain ? '' : 'NO ') . 'CHAIN');
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user