Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 20a064f

Browse filesBrowse files
committed
[HttpKernel] Remove FrameworkBundle dependency in BundleTest
1 parent 375a2c7 commit 20a064f
Copy full SHA for 20a064f

File tree

Expand file treeCollapse file tree

1 file changed

+3
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-4
lines changed
Open diff view settings
Collapse file

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php
+3-4Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.