@@ -97,35 +97,12 @@ public function testProcessServicesWithSameCommand()
97
97
{
98
98
$ container = new ContainerBuilder ();
99
99
$ container ->addCompilerPass (new AddConsoleCommandPass ());
100
- $ container ->setParameter ('my-command.class ' , 'Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler\MyCommand ' );
101
-
102
- $ definition1 = new Definition ('%my-command.class% ' );
103
- $ definition1 ->addTag ('console.command ' );
104
-
105
- $ definition2 = new Definition ('%my-command.class% ' );
106
- $ definition2 ->addTag ('console.command ' );
107
-
108
- $ container ->setDefinition ('my-command1 ' , $ definition1 );
109
- $ container ->setDefinition ('my-command2 ' , $ definition2 );
110
-
111
- $ container ->compile ();
112
-
113
- $ alias1 = 'console.command.symfony_bundle_frameworkbundle_tests_dependencyinjection_compiler_mycommand ' ;
114
- $ alias2 = $ alias1 . '_my-command2 ' ;
115
- $ this ->assertTrue ($ container ->hasAlias ($ alias1 ));
116
- $ this ->assertTrue ($ container ->hasAlias ($ alias2 ));
117
- }
118
-
119
- public function testProcessServicesWithSameCommand ()
120
- {
121
- $ container = new ContainerBuilder ();
122
- $ container ->addCompilerPass (new AddConsoleCommandPass ());
123
- $ container ->setParameter ('my-command.class ' , 'Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler\MyCommand ' );
100
+ $ className = 'Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler\MyCommand ' ;
124
101
125
- $ definition1 = new Definition (' %my-command.class% ' );
102
+ $ definition1 = new Definition ($ className );
126
103
$ definition1 ->addTag ('console.command ' );
127
104
128
- $ definition2 = new Definition (' %my-command.class% ' );
105
+ $ definition2 = new Definition ($ className );
129
106
$ definition2 ->addTag ('console.command ' );
130
107
131
108
$ container ->setDefinition ('my-command1 ' , $ definition1 );
<
3760
/code>
0 commit comments