From 20a064f36aa706d2b1ac632b7a701996e55984ff Mon Sep 17 00:00:00 2001 From: florianv Date: Tue, 17 Dec 2013 17:31:58 +0100 Subject: [PATCH] [HttpKernel] Remove FrameworkBundle dependency in BundleTest --- .../Component/HttpKernel/Tests/Bundle/BundleTest.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php b/src/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php index a451b7aba0212..f31d245c4b57e 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php @@ -11,10 +11,8 @@ namespace Symfony\Component\HttpKernel\Tests\Bundle; -use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddConsoleCommandPass; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\HttpKernel\Bundle\Bundle; use Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionAbsentBundle\ExtensionAbsentBundle; use Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\Command\FooCommand; use Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\ExtensionPresentBundle; @@ -38,10 +36,11 @@ public function testRegisterCommands() public function testRegisterCommandsIngoreCommandAsAService() { $container = new ContainerBuilder(); - $container->addCompilerPass(new AddConsoleCommandPass()); - $definition = new Definition('Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\Command\FooCommand'); + $commandClass = 'Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\Command\FooCommand'; + $definition = new Definition($commandClass); $definition->addTag('console.command'); $container->setDefinition('my-command', $definition); + $container->setAlias('console.command.'.strtolower(str_replace('\\', '_', $commandClass)), 'my-command'); $container->compile(); $application = $this->getMock('Symfony\Component\Console\Application');