]> git.mxchange.org Git - friendica.git/commitdiff
Add testmode
authorMichael <heluecht@pirati.ca>
Fri, 15 May 2020 19:16:14 +0000 (19:16 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 15 May 2020 19:16:14 +0000 (19:16 +0000)
tests/DatabaseTestTrait.php
tests/src/Core/StorageManagerTest.php

index d8a5c165a4f99f09042d4186180d7f5f9a3c3dc6..9922d7313f9fda7d2ca16486fb59d83fd47c009c 100644 (file)
@@ -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();
        }
 
index c6f4558b701e52da36ebed61093146d51f49c375..9736fe0290da59fe25758f5a19313fd5a8600a96 100644 (file)
@@ -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);