From: Michael Date: Fri, 15 May 2020 19:16:14 +0000 (+0000) Subject: Add testmode X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=434ce00d19d54beaf9dfc09dbd2beac16c6460ca;p=friendica.git Add testmode --- diff --git a/tests/DatabaseTestTrait.php b/tests/DatabaseTestTrait.php index d8a5c165a4..9922d7313f 100644 --- a/tests/DatabaseTestTrait.php +++ b/tests/DatabaseTestTrait.php @@ -22,6 +22,7 @@ namespace Friendica\Test; use Friendica\Database\Database; +use Friendica\Database\DBStructure; use Friendica\Test\Util\Database\StaticDatabase; /** @@ -37,6 +38,10 @@ trait DatabaseTestTrait // Start the first, outer transaction StaticDatabase::getGlobConnection()->beginTransaction(); + $this->dba->setTestmode(true); + + DBStructure::checkInitialValues(); + parent::setUp(); } diff --git a/tests/src/Core/StorageManagerTest.php b/tests/src/Core/StorageManagerTest.php index c6f4558b70..9736fe0290 100644 --- a/tests/src/Core/StorageManagerTest.php +++ b/tests/src/Core/StorageManagerTest.php @@ -34,6 +34,7 @@ use Friendica\Factory\ConfigFactory; use Friendica\Model\Config\Config; use Friendica\Model\Storage; use Friendica\Core\Session; +use Friendica\Database\DBStructure; use Friendica\Test\DatabaseTest; use Friendica\Test\Util\Database\StaticDatabase; use Friendica\Test\Util\VFSTrait; @@ -74,6 +75,10 @@ class StorageManagerTest extends DatabaseTest $this->dba = new StaticDatabase($configCache, $profiler, $this->logger); + $this->dba->setTestmode(true); + + DBStructure::checkInitialValues(); + $configModel = new Config($this->dba); $this->config = new PreloadConfig($configCache, $configModel);