Fixed transaction manager tests using real DB

This commit is contained in:
Marcin Kurczewski 2014-09-18 10:42:34 +02:00
parent 5cfb225400
commit 3b505a9c60
2 changed files with 3 additions and 3 deletions

View file

@ -26,9 +26,9 @@ class TransactionManager
if ($pdo->inTransaction())
return $callback();
$pdo->beginTransaction();
try
{
$pdo->beginTransaction();
$ret = $callback();
$pdo->$operation();
return $ret;

View file

@ -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);
}
}