File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Open diff view settings
src/Symfony/Component/HttpKernel/Tests/Bundle Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Open diff view settings
Original file line number Diff line number Diff line change 1111
1212namespace Symfony \Component \HttpKernel \Tests \Bundle ;
1313
14- use Symfony \Bundle \FrameworkBundle \DependencyInjection \Compiler \AddConsoleCommandPass ;
1514use Symfony \Component \DependencyInjection \ContainerBuilder ;
1615use Symfony \Component \DependencyInjection \Definition ;
17- use Symfony \Component \HttpKernel \Bundle \Bundle ;
1816use Symfony \Component \HttpKernel \Tests \Fixtures \ExtensionAbsentBundle \ExtensionAbsentBundle ;
1917use Symfony \Component \HttpKernel \Tests \Fixtures \ExtensionPresentBundle \Command \FooCommand ;
2018use 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 ' );
You can’t perform that action at this time.
0 commit comments