Skip to content

Commit

Permalink
Update tests due improve ConfigFactory::create() (#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
devanych committed Dec 23, 2021
1 parent 9f64d47 commit d12dfa3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tests/Functional/EventListenerConfigurationTest.php
Expand Up @@ -6,6 +6,7 @@

use PHPUnit\Framework\TestCase;
use Psr\Container\ContainerInterface;
use Yiisoft\Config\ConfigPaths;
use Yiisoft\Di\Container;
use Yiisoft\Di\ContainerConfig;
use Yiisoft\Yii\Event\ListenerConfigurationChecker;
Expand All @@ -17,7 +18,7 @@ class EventListenerConfigurationTest extends TestCase
{
public function testConsoleListenerConfiguration(): void
{
$config = ConfigFactory::create(dirname(__DIR__, 2), null);
$config = ConfigFactory::create(new ConfigPaths(dirname(__DIR__, 2), 'config'), null);

$containerConfig = ContainerConfig::create()
->withDefinitions($config->get('console'));
Expand Down
3 changes: 2 additions & 1 deletion tests/Unit/HelloCest.php
Expand Up @@ -10,6 +10,7 @@
use Symfony\Component\Console\CommandLoader\ContainerCommandLoader;
use Symfony\Component\Console\Tester\CommandTester;
use Yiisoft\Config\Config;
use Yiisoft\Config\ConfigPaths;
use Yiisoft\Di\Container;
use Yiisoft\Di\ContainerConfig;
use Yiisoft\Yii\Console\ExitCode;
Expand Down Expand Up @@ -58,6 +59,6 @@ public function testExecute(UnitTester $I): void

private function getConfig(): Config
{
return ConfigFactory::create(dirname(__DIR__, 2), null);
return ConfigFactory::create(new ConfigPaths(dirname(__DIR__, 2), 'config'), null);
}
}

0 comments on commit d12dfa3

Please sign in to comment.