X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=tests%2FDatabaseTestTrait.php;h=eae5ce2ac9dd5c3a0eb24a69e120dd713266677b;hb=8b6ace6629ab4fe229c4c35ff388efe320602a16;hp=9922d7313f9fda7d2ca16486fb59d83fd47c009c;hpb=434ce00d19d54beaf9dfc09dbd2beac16c6460ca;p=friendica.git diff --git a/tests/DatabaseTestTrait.php b/tests/DatabaseTestTrait.php index 9922d7313f..eae5ce2ac9 100644 --- a/tests/DatabaseTestTrait.php +++ b/tests/DatabaseTestTrait.php @@ -1,6 +1,6 @@ rollBack(); // Start the first, outer transaction StaticDatabase::getGlobConnection()->beginTransaction(); - - $this->dba->setTestmode(true); - - DBStructure::checkInitialValues(); - - 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"); + } } /**