From b2e56d022434521c0793c75e10d07d6841b8655e Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 15 May 2020 19:26:52 +0000 Subject: [PATCH] Moved class call --- tests/DatabaseTestTrait.php | 5 ----- tests/Util/Database/StaticDatabase.php | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/DatabaseTestTrait.php b/tests/DatabaseTestTrait.php index 9a0152026a..d8a5c165a4 100644 --- a/tests/DatabaseTestTrait.php +++ b/tests/DatabaseTestTrait.php @@ -22,7 +22,6 @@ namespace Friendica\Test; use Friendica\Database\Database; -use Friendica\Database\DBStructure; use Friendica\Test\Util\Database\StaticDatabase; /** @@ -38,10 +37,6 @@ trait DatabaseTestTrait // Start the first, outer transaction StaticDatabase::getGlobConnection()->beginTransaction(); - StaticDatabase::setTestmode(true); - - DBStructure::checkInitialValues(); - parent::setUp(); } diff --git a/tests/Util/Database/StaticDatabase.php b/tests/Util/Database/StaticDatabase.php index f2ed6c700e..38466c65bd 100644 --- a/tests/Util/Database/StaticDatabase.php +++ b/tests/Util/Database/StaticDatabase.php @@ -22,6 +22,7 @@ namespace Friendica\Test\Util\Database; use Friendica\Database\Database; +use Friendica\Database\DBStructure; use PDO; use PDOException; @@ -57,6 +58,10 @@ class StaticDatabase extends Database $this->connection = self::$staticConnection; $this->connected = true; + $this->setTestmode(true); + + DBStructure::checkInitialValues(); + return $this->connected; } -- 2.39.5