X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=tests%2FDatabaseTestTrait.php;h=eae5ce2ac9dd5c3a0eb24a69e120dd713266677b;hb=8b6ace6629ab4fe229c4c35ff388efe320602a16;hp=d8a5c165a4f99f09042d4186180d7f5f9a3c3dc6;hpb=b2e56d022434521c0793c75e10d07d6841b8655e;p=friendica.git diff --git a/tests/DatabaseTestTrait.php b/tests/DatabaseTestTrait.php index d8a5c165a4..eae5ce2ac9 100644 --- a/tests/DatabaseTestTrait.php +++ b/tests/DatabaseTestTrait.php @@ -1,6 +1,6 @@ rollBack(); // Start the first, outer transaction StaticDatabase::getGlobConnection()->beginTransaction(); - - parent::setUp(); } - protected function tearDown() + protected function tearDownDb() { - // Rollbacks every DB usage so we don't commit anything into the DB - StaticDatabase::statRollback(); - - parent::tearDown(); + try { + // Rollbacks every DB usage so we don't commit anything into the DB + StaticDatabase::statRollback(); + } catch (\PDOException $exception) { + print_r("Found already rolled back transaction"); + } } /**