]> git.mxchange.org Git - friendica.git/blobdiff - tests/DatabaseTest.php
Add themed themed error page or login page for /admin[/*]
[friendica.git] / tests / DatabaseTest.php
index 5c66711dcf0e6e9d6122b1b639b56a6b93d5da26..b3418c20f4024878c9999ebf9f6d908d6374335b 100644 (file)
@@ -5,10 +5,12 @@
 
 namespace Friendica\Test;
 
-use Friendica\Core\Config;
+use Friendica\App;
 use Friendica\Database\DBA;
 use Friendica\Factory;
 use Friendica\Util\BasePath;
+use Friendica\Util\Config\ConfigFileLoader;
+use Friendica\Util\Logger\VoidLogger;
 use Friendica\Util\Profiler;
 use PHPUnit\DbUnit\DataSet\YamlDataSet;
 use PHPUnit\DbUnit\TestCaseTrait;
@@ -40,8 +42,9 @@ abstract class DatabaseTest extends MockedTest
                        $this->markTestSkipped('Please set the MYSQL_* environment variables to your test database credentials.');
                }
 
-               $basedir = BasePath::create(dirname(__DIR__));
-               $configLoader = new Config\ConfigCacheLoader($basedir);
+               $basePath = BasePath::create(dirname(__DIR__));
+               $mode = new App\Mode($basePath);
+               $configLoader = new ConfigFileLoader($basePath, $mode);
                $config = Factory\ConfigFactory::createCache($configLoader);
 
                $profiler = \Mockery::mock(Profiler::class);
@@ -49,6 +52,7 @@ abstract class DatabaseTest extends MockedTest
                DBA::connect(
                        $config,
                        $profiler,
+                       new VoidLogger(),
                        getenv('MYSQL_HOST'),
                        getenv('MYSQL_USERNAME'),
                        getenv('MYSQL_PASSWORD'),