Skip to content

Commit

Permalink
Adapt to DI changes (#402)
Browse files Browse the repository at this point in the history
  • Loading branch information
samdark committed Nov 26, 2021
1 parent a3f4611 commit 808ade6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/Functional/EventListenerConfigurationTest.php
Expand Up @@ -7,6 +7,7 @@
use PHPUnit\Framework\TestCase;
use Psr\Container\ContainerInterface;
use Yiisoft\Di\Container;
use Yiisoft\Di\ContainerConfig;
use Yiisoft\Yii\Event\ListenerConfigurationChecker;
use Yiisoft\Yii\Runner\ConfigFactory;

Expand All @@ -18,7 +19,9 @@ public function testConsoleListenerConfiguration(): void
{
$config = ConfigFactory::create(dirname(__DIR__, 2), null);

$container = (new Container($config->get('console')))->get(ContainerInterface::class);
$containerConfig = ContainerConfig::create()
->withDefinitions($config->get('console'));
$container = (new Container($containerConfig))->get(ContainerInterface::class);
$checker = $container->get(ListenerConfigurationChecker::class);
$checker->check($config->get('events-console'));

Expand Down

0 comments on commit 808ade6

Please sign in to comment.