@@ -82,4 +82,41 @@ public function testValidCommandsViewPathsArgument()
82
82
$ this ->assertSame ($ expectedViewPaths , $ debugCommand ->getArgument (6 ));
83
83
$ this ->assertSame ($ expectedViewPaths , $ updateCommand ->getArgument (7 ));
84
84
}
85
+
86
+ public function testCommandsViewPathsArgumentsAreIgnoredWithOldServiceDefinitions ()
87
+ {
88
+ $ container = new ContainerBuilder ();
89
+ $ container ->register ('translator.default ' )
90
+ ->setArguments ([null , null , null , null ])
91
+ ;
92
+ $ debugCommand = $ container ->register ('console.command.translation_debug ' )
93
+ ->setArguments ([
94
+ new Reference ('translator ' ),
95
+ new Reference ('translation.reader ' ),
96
+ new Reference ('translation.extractor ' ),
97
+ '%translator.default_path% ' ,
98
+ null ,
99
+ ])
100
+ ;
101
+ $ updateCommand = $ container ->register ('console.command.translation_update ' )
102
+ ->setArguments ([
103
+ new Reference ('translation.writer ' ),
104
+ new Reference ('translation.reader ' ),
105
+ new Reference ('translation.extractor ' ),
106
+ '%kernel.default_locale% ' ,
107
+ '%translator.default_path% ' ,
108
+ null ,
109
+ ])
110
+ ;
111
+ $ container ->register ('twig.template_iterator ' )
112
+ ->setArguments ([null , null , ['other/templates ' => null , 'tpl ' => 'App ' ]])
113
+ ;
114
+ $ container ->setParameter ('twig.default_path ' , 'templates ' );
115
+
116
+ $ pass = new TranslatorPass ('translator.default ' );
117
+ $ pass ->process ($ container );
118
+
119
+ $ this ->assertSame ('templates ' , $ debugCommand ->getArgument (4 ));
120
+ $ this ->assertSame ('templates ' , $ updateCommand ->getArgument (5 ));
121
+ }
85
122
}
0 commit comments