X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=tests%2FDatabaseTestTrait.php;h=7d255c693b5b9ff996b5ee28d4771b15469293ca;hb=0649d2c3934f5b9548bea32e2d17aa830104162d;hp=d8a5c165a4f99f09042d4186180d7f5f9a3c3dc6;hpb=aa0b485f3dca72c5448076e913fa54d948cd7731;p=friendica.git diff --git a/tests/DatabaseTestTrait.php b/tests/DatabaseTestTrait.php index d8a5c165a4..7d255c693b 100644 --- a/tests/DatabaseTestTrait.php +++ b/tests/DatabaseTestTrait.php @@ -1,6 +1,6 @@ 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"); + } } /**