Fixed transaction manager tests using real DB
This commit is contained in:
parent
5cfb225400
commit
3b505a9c60
2 changed files with 3 additions and 3 deletions
|
@ -26,9 +26,9 @@ class TransactionManager
|
|||
if ($pdo->inTransaction())
|
||||
return $callback();
|
||||
|
||||
$pdo->beginTransaction();
|
||||
try
|
||||
{
|
||||
$pdo->beginTransaction();
|
||||
$ret = $callback();
|
||||
$pdo->$operation();
|
||||
return $ret;
|
||||
|
|
|
@ -67,11 +67,11 @@ class TransactionManagerTest extends \Szurubooru\Tests\AbstractDatabaseTestCase
|
|||
|
||||
private function getTestDao()
|
||||
{
|
||||
return \Szurubooru\Injector::get(\Szurubooru\Dao\TokenDao::class);
|
||||
return new \Szurubooru\Dao\TokenDao($this->databaseConnection);
|
||||
}
|
||||
|
||||
private function getTransactionManager()
|
||||
{
|
||||
return \Szurubooru\Injector::get(\Szurubooru\Dao\TransactionManager::class);
|
||||
return new \Szurubooru\Dao\TransactionManager($this->databaseConnection);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue