]> git.mxchange.org Git - friendica.git/commitdiff
Fix tests (static usage for non-static methods)
authorPhilipp Holzer <admin+github@philipp.info>
Sun, 21 Jul 2019 12:20:45 +0000 (14:20 +0200)
committerPhilipp Holzer <admin+github@philipp.info>
Sun, 21 Jul 2019 12:21:08 +0000 (14:21 +0200)
tests/src/Database/DBATest.php
tests/src/Database/DBStructureTest.php

index 1ca5cd8bcfe9ff135f788748bd378d808d30cab4..69ea267bd2890999ab0501cb3d54350f5533f51d 100644 (file)
@@ -15,10 +15,12 @@ class DBATest extends DatabaseTest
        public function setUp()
        {
                $configModel = new \Friendica\Model\Config\Config(self::$dba);
-               $config = Factory\ConfigFactory::createConfig(self::$configCache, $configModel);
+               $configFactory = new Factory\ConfigFactory();
+               $config = $configFactory->createConfig(self::$configCache, $configModel);
                $pconfigModel = new \Friendica\Model\Config\PConfig(self::$dba);
-               Factory\ConfigFactory::createPConfig(self::$configCache, new PConfigCache(), $pconfigModel);
-               $logger = Factory\LoggerFactory::create('test', self::$dba, $config, self::$profiler);
+               $configFactory->createPConfig(self::$configCache, new PConfigCache(), $pconfigModel);
+               $loggerFactory = new Factory\LoggerFactory();
+               $logger = $loggerFactory->create('test', self::$dba, $config, self::$profiler);
                $baseUrl = new BaseURL($config, $_SERVER);
                $router = new App\Router();
                $l10n = new L10n($config,
index ef777b30e8164ebb6afc77f22f441eacf6f31af9..a951d1c0914f894b1551164a263ac5bd10501633 100644 (file)
@@ -19,10 +19,12 @@ class DBStructureTest extends DatabaseTest
        public function setUp()
        {
                $configModel = new Config(self::$dba);
-               $config = Factory\ConfigFactory::createConfig(self::$configCache, $configModel);
+               $configFactory = new Factory\ConfigFactory();
+               $config = $configFactory->createConfig(self::$configCache, $configModel);
                $pconfigModel = new \Friendica\Model\Config\PConfig(self::$dba);
-               Factory\ConfigFactory::createPConfig(self::$configCache, new PConfigCache(), $pconfigModel);
-               $logger = Factory\LoggerFactory::create('test', self::$dba, $config, self::$profiler);
+               $configFactory->createPConfig(self::$configCache, new PConfigCache(), $pconfigModel);
+               $loggerFactory = new Factory\LoggerFactory();
+               $logger = $loggerFactory->create('test', self::$dba, $config, self::$profiler);
                $baseUrl = new BaseURL($config, $_SERVER);
                $router = new App\Router();
                $l10n = new L10n($config,