1
0
Fork 0

Add testmode

This commit is contained in:
Michael 2020-05-15 19:16:14 +00:00
parent 6272b8d4e0
commit 434ce00d19
2 changed files with 10 additions and 0 deletions

View 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();
}

View 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);