diff --git a/tests/src/Core/Cache/DatabaseCacheTest.php b/tests/src/Core/Cache/DatabaseCacheTest.php index b8d49aa0c..71b488bcb 100644 --- a/tests/src/Core/Cache/DatabaseCacheTest.php +++ b/tests/src/Core/Cache/DatabaseCacheTest.php @@ -23,6 +23,8 @@ namespace Friendica\Test\src\Core\Cache; use Friendica\Core\Cache; use Friendica\Core\Config\Factory\Config; +use Friendica\Database\Definition\DbaDefinition; +use Friendica\Database\Definition\ViewDefinition; use Friendica\Test\DatabaseTestTrait; use Friendica\Test\Util\Database\StaticDatabase; use Friendica\Test\Util\VFSTrait; @@ -57,7 +59,10 @@ class DatabaseCacheTest extends CacheTest $loader = (new Config())->createConfigFileLoader($this->root->url(), []); $configCache = $configFactory->createCache($loader); - $dba = new StaticDatabase($configCache, $profiler, $logger); + $dbaDefinition = (new DbaDefinition($configCache->get('system', 'basepath')))->load(); + $viewDefinition = (new ViewDefinition($configCache->get('system', 'basepath')))->load(); + + $dba = new StaticDatabase($configCache, $profiler, $dbaDefinition, $viewDefinition, $logger); $this->cache = new Cache\Type\DatabaseCache('database', $dba); return $this->cache; diff --git a/tests/src/Core/Storage/DatabaseStorageTest.php b/tests/src/Core/Storage/DatabaseStorageTest.php index 8f8dc8bf1..75bbc4239 100644 --- a/tests/src/Core/Storage/DatabaseStorageTest.php +++ b/tests/src/Core/Storage/DatabaseStorageTest.php @@ -23,6 +23,8 @@ namespace Friendica\Test\src\Core\Storage; use Friendica\Core\Config\Factory\Config; use Friendica\Core\Storage\Type\Database; +use Friendica\Database\Definition\DbaDefinition; +use Friendica\Database\Definition\ViewDefinition; use Friendica\Test\DatabaseTestTrait; use Friendica\Test\Util\Database\StaticDatabase; use Friendica\Test\Util\VFSTrait; @@ -56,7 +58,10 @@ class DatabaseStorageTest extends StorageTest $loader = (new Config())->createConfigFileLoader($this->root->url(), []); $configCache = $configFactory->createCache($loader); - $dba = new StaticDatabase($configCache, $profiler, $logger); + $dbaDefinition = (new DbaDefinition($configCache->get('system', 'basepath')))->load(); + $viewDefinition = (new ViewDefinition($configCache->get('system', 'basepath')))->load(); + + $dba = new StaticDatabase($configCache, $profiler, $dbaDefinition, $viewDefinition, $logger); return new Database($dba); } diff --git a/tests/src/Core/Storage/Repository/StorageManagerTest.php b/tests/src/Core/Storage/Repository/StorageManagerTest.php index cce12b790..99dee27a6 100644 --- a/tests/src/Core/Storage/Repository/StorageManagerTest.php +++ b/tests/src/Core/Storage/Repository/StorageManagerTest.php @@ -37,6 +37,8 @@ use Friendica\Core\Storage\Repository\StorageManager; use Friendica\Core\Storage\Type\Filesystem; use Friendica\Core\Storage\Type\SystemResource; use Friendica\Database\Database; +use Friendica\Database\Definition\DbaDefinition; +use Friendica\Database\Definition\ViewDefinition; use Friendica\DI; use Friendica\Core\Config\Factory\Config; use Friendica\Core\Config\Repository; @@ -82,7 +84,10 @@ class StorageManagerTest extends DatabaseTest $loader = $configFactory->createConfigFileLoader($this->root->url(), []); $configCache = $configFactory->createCache($loader); - $this->dba = new StaticDatabase($configCache, $profiler, $this->logger); + $dbaDefinition = (new DbaDefinition($configCache->get('system', 'basepath')))->load(); + $viewDefinition = (new ViewDefinition($configCache->get('system', 'basepath')))->load(); + + $this->dba = new StaticDatabase($configCache, $profiler, $dbaDefinition, $viewDefinition, $this->logger); $configModel = new Repository\Config($this->dba, new Mode(Mode::DBCONFIGAVAILABLE)); $this->config = new PreloadConfig($configCache, $configModel);