8000 [HttpKernel] Remove FrameworkBundle dependency in BundleTest · symfony/symfony@20a064f · GitHub
[go: up one dir, main page]

Skip to content

Commit 20a064f

Browse files
committed
[HttpKernel] Remove FrameworkBundle dependency in BundleTest
1 parent 375a2c7 commit 20a064f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@
1111

1212
namespace Symfony\Component\HttpKernel\Tests\Bundle;
1313

14-
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddConsoleCommandPass;
1514
use Symfony\Component\DependencyInjection\ContainerBuilder;
1615
use Symfony\Component\DependencyInjection\Definition;
17-
use Symfony\Component\HttpKernel\Bundle\Bundle;
1816
use Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionAbsentBundle\ExtensionAbsentBundle;
1917
use Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\Command\FooCommand;
2018
use Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\ExtensionPresentBundle;
@@ -38,10 +36,11 @@ public function testRegisterCommands()
3836
public function testRegisterCommandsIngoreCommandAsAService()
3937
{
4038
$container = new ContainerBuilder();
41-
$container->addCompilerPass(new AddConsoleCommandPass());
42-
$definition = new Definition('Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\Command\FooCommand');
39+
$commandClass = 'Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\Command\FooCommand';
40+
$definition = new Definition($commandClass);
4341
$definition->addTag('console.command');
4442
$container->setDefinition('my-command', $definition);
43+
$container->setAlias('console.command.'.strtolower(str_replace('\\', '_', $commandClass)), 'my-command');
4544
$container->compile();
4645

4746
$application = $this->getMock('Symfony\Component\Console\Application');

0 commit comments

Comments
 (0)
0