mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +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);
|
||||
}
|
||||
// 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)
|
||||
{
|
||||
$this->fixtureFactories[strtolower($class)] = Injector::inst()->create(FixtureFactory::class);
|
||||
$class = strtolower($class);
|
||||
$this->fixtureFactories[$class] = Injector::inst()->create(FixtureFactory::class);
|
||||
$this->loaded[$class] = false;
|
||||
}
|
||||
|
||||
@ -277,6 +278,6 @@ class FixtureTestState implements TestState
|
||||
*/
|
||||
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()
|
||||
{
|
||||
// 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);
|
||||
}
|
||||
return 0;
|
||||
|
@ -360,10 +360,7 @@ class MySQLDatabase extends Database
|
||||
return false;
|
||||
}
|
||||
--$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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user