]> git.mxchange.org Git - friendica.git/blobdiff - tests/functional/DependencyCheckTest.php
Remove duplicate profile_uid key in App->profile array
[friendica.git] / tests / functional / DependencyCheckTest.php
index 5ade50dfb438db863dffede60ccad4a93535cca3..944b6239050c0b5d5ece96fd63a88418ecafd94d 100644 (file)
@@ -6,8 +6,8 @@ use Dice\Dice;
 use Friendica\App;
 use Friendica\Core\Cache\ICache;
 use Friendica\Core\Cache\IMemoryCache;
-use Friendica\Core\Config\Cache\ConfigCache;
-use Friendica\Core\Config\Configuration;
+use Friendica\Core\Config\Cache;
+use Friendica\Core\Config\IConfig;
 use Friendica\Core\Lock\ILock;
 use Friendica\Database\Database;
 use Friendica\Test\Util\VFSTrait;
@@ -59,7 +59,7 @@ class dependencyCheck extends TestCase
 
                $this->assertInstanceOf(ConfigFileLoader::class, $configFileLoader);
 
-               $configCache = new ConfigCache();
+               $configCache = new Cache();
                $configFileLoader->setupCache($configCache);
 
                $this->assertNotEmpty($configCache->getAll());
@@ -77,7 +77,7 @@ class dependencyCheck extends TestCase
 
                $this->assertInstanceOf(Profiler::class, $profiler);
 
-               $configCache = new ConfigCache([
+               $configCache = new Cache([
                        'system' => [
                                'profiler' => true,
                        ],
@@ -87,7 +87,7 @@ class dependencyCheck extends TestCase
                ]);
 
                // create new DI-library because of shared instance rule (so the Profiler wouldn't get created twice)
-               $this->dice = new Dice(include __DIR__ . '/../../static/dependencies.config.php');
+               $this->dice = new Dice();
                $profiler = $this->dice->create(Profiler::class, [$configCache]);
 
                $this->assertInstanceOf(Profiler::class, $profiler);
@@ -115,10 +115,10 @@ class dependencyCheck extends TestCase
 
        public function testConfiguration()
        {
-               /** @var Configuration $config */
-               $config = $this->dice->create(Configuration::class);
+               /** @var IConfig $config */
+               $config = $this->dice->create(IConfig::class);
 
-               $this->assertInstanceOf(Configuration::class, $config);
+               $this->assertInstanceOf(IConfig::class, $config);
 
                $this->assertNotEmpty($config->get('database', 'username'));
        }
@@ -133,6 +133,10 @@ class dependencyCheck extends TestCase
 
        public function testDevLogger()
        {
+               /** @var IConfig $config */
+               $config = $this->dice->create(IConfig::class);
+               $config->set('system', 'dlogfile', $this->root->url() . '/friendica.log');
+
                /** @var LoggerInterface $logger */
                $logger = $this->dice->create('$devLogger', ['dev']);