X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=tests%2FDatabaseTest.php;h=7421f16a09c5342e313c12aa70d161577974e2ba;hb=8215c493cf5fc6e1f09295c8262f18621560935c;hp=1783bc605377c3d2a3b998d09178b9f468e3a42d;hpb=b08ac3c0a704c22a293c2e74b17df24fb46ab3e7;p=friendica.git diff --git a/tests/DatabaseTest.php b/tests/DatabaseTest.php index 1783bc6053..7421f16a09 100644 --- a/tests/DatabaseTest.php +++ b/tests/DatabaseTest.php @@ -5,29 +5,10 @@ namespace Friendica\Test; -use Friendica\Test\Util\Database\StaticDatabase; - /** * Abstract class used by tests that need a database. */ abstract class DatabaseTest extends MockedTest { - protected function setUp() - { - parent::setUp(); - - StaticDatabase::statConnect($_SERVER); - // Rollbacks every DB usage (in case the test couldn't call tearDown) - StaticDatabase::statRollback(); - // Start the first, outer transaction - StaticDatabase::getGlobConnection()->beginTransaction(); - } - - protected function tearDown() - { - // Rollbacks every DB usage so we don't commit anything into the DB - StaticDatabase::statRollback(); - - parent::tearDown(); - } + use DatabaseTestTrait; }