@@ -37,10 +37,11 @@ public function testLoad()
3737
3838 if (in_array ('fileExists ' , get_class_methods ('Symfony\Component\DependencyInjection\ContainerBuilder ' ))) {
3939 $ container ->fileExists (Argument::any ())->willReturn (true );
40+ } else {
41+ $ container ->addResource (Argument::which ('getResource ' , realpath (__DIR__ . '/../../Resources/config/handlebars.xml ' )))->shouldBeCalled ();
4042 }
4143 $ container ->getParameterBag ()->willReturn ($ parameterBag ->reveal ());
4244 $ container ->hasExtension (Argument::any ())->willReturn (false );
43- $ container ->addResource (new FileResource (realpath (__DIR__ . '/../../Resources/config/handlebars.xml ' )))->shouldBeCalled ();
4445 $ container ->setDefinition (
4546 Argument::type ('string ' ),
4647 Argument::type ('Symfony\Component\DependencyInjection\Definition ' )
@@ -93,10 +94,12 @@ public function testAssetic()
9394
9495 if (in_array ('fileExists ' , get_class_methods ('Symfony\Component\DependencyInjection\ContainerBuilder ' ))) {
9596 $ container ->fileExists (Argument::any ())->willReturn (true );
97+ } else {
98+ $ container ->addResource (Argument::which ('getResource ' , realpath (__DIR__ . '/../../Resources/config/handlebars.xml ' )))->shouldBeCalled ();
99+ $ container ->addResource (new FileResource ($ bundleDir . '/Resources/config/assetic.xml ' ))->shouldBeCalled ();
96100 }
97101 $ container ->getParameterBag ()->willReturn ($ parameterBag ->reveal ());
98102 $ container ->hasExtension (Argument::any ())->willReturn (false );
99- $ container ->addResource (new FileResource (realpath (__DIR__ . '/../../Resources/config/handlebars.xml ' )))->shouldBeCalled ();
100103 $ container ->setDefinition (
101104 Argument::type ('string ' ),
102105 Argument::type ('Symfony\Component\DependencyInjection\Definition ' )
@@ -111,7 +114,6 @@ public function testAssetic()
111114 $ container ->setParameter ("handlebars.translation.interpolation_suffix " , '% ' )->shouldBeCalled ();
112115 $ container ->getParameter ('kernel.bundles ' )->willReturn ([])->shouldBeCalled ();
113116 $ container ->setParameter ('handlebars.assetic ' , true )->shouldBeCalled ();
114- $ container ->addResource (new FileResource ($ bundleDir . '/Resources/config/assetic.xml ' ))->shouldBeCalled ();
115117
116118 $ container ->getDefinition ("handlebars.loader.filesystem " )
117119 ->willReturn ($ loaderDefinition ->reveal ())->shouldBeCalled ();
@@ -149,10 +151,11 @@ public function testBundlePaths()
149151
150152 if (in_array ('fileExists ' , get_class_methods ('Symfony\Component\DependencyInjection\ContainerBuilder ' ))) {
151153 $ container ->fileExists (Argument::any ())->willReturn (true );
154+ } else {
155+ $ container ->addResource (Argument::which ('getResource ' , realpath (__DIR__ . '/../../Resources/config/handlebars.xml ' )))->shouldBeCalled ();
152156 }
153157 $ container ->getParameterBag ()->willReturn ($ parameterBag ->reveal ());
154158 $ container ->hasExtension (Argument::any ())->willReturn (false );
155- $ container ->addResource (new FileResource (realpath (__DIR__ . '/../../Resources/config/handlebars.xml ' )))->shouldBeCalled ();
156159 $ container ->setDefinition (
157160 Argument::type ('string ' ),
158161 Argument::type ('Symfony\Component\DependencyInjection\Definition ' )
@@ -207,10 +210,11 @@ public function testAddConfigPath()
207210
208211 if (in_array ('fileExists ' , get_class_methods ('Symfony\Component\DependencyInjection\ContainerBuilder ' ))) {
209212 $ container ->fileExists (Argument::any ())->willReturn (true );
213+ } else {
214+ $ container ->addResource (Argument::which ('getResource ' , realpath (__DIR__ . '/../../Resources/config/handlebars.xml ' )))->shouldBeCalled ();
210215 }
211216 $ container ->getParameterBag ()->willReturn ($ parameterBag ->reveal ());
212217 $ container ->hasExtension (Argument::any ())->willReturn (false );
213- $ container ->addResource (new FileResource (realpath (__DIR__ . '/../../Resources/config/handlebars.xml ' )))->shouldBeCalled ();
214218 $ container ->setDefinition (
215219 Argument::type ('string ' ),
216220 Argument::type ('Symfony\Component\DependencyInjection\Definition ' )
@@ -262,10 +266,11 @@ public function testFlags()
262266
263267 if (in_array ('fileExists ' , get_class_methods ('Symfony\Component\DependencyInjection\ContainerBuilder ' ))) {
264268 $ container ->fileExists (Argument::any ())->willReturn (true );
269+ } else {
270+ $ container ->addResource (Argument::which ('getResource ' , realpath (__DIR__ . '/../../Resources/config/handlebars.xml ' )))->shouldBeCalled ();
265271 }
266272 $ container ->getParameterBag ()->willReturn ($ parameterBag ->reveal ());
267273 $ container ->hasExtension (Argument::any ())->willReturn (false );
268- $ container ->addResource (new FileResource (realpath (__DIR__ . '/../../Resources/config/handlebars.xml ' )))->shouldBeCalled ();
269274 $ container ->setDefinition (
270275 Argument::type ('string ' ),
271276 Argument::type ('Symfony\Component\DependencyInjection\Definition ' )
@@ -328,10 +333,11 @@ public function testExcludeFlags()
328333
329334 if (in_array ('fileExists ' , get_class_methods ('Symfony\Component\DependencyInjection\ContainerBuilder ' ))) {
330335 $ container ->fileExists (Argument::any ())->willReturn (true );
336+ } else {
337+ $ container ->addResource (Argument::which ('getResource ' , realpath (__DIR__ . '/../../Resources/config/handlebars.xml ' )))->shouldBeCalled ();
331338 }
332339 $ container ->getParameterBag ()->willReturn ($ parameterBag ->reveal ());
333340 $ container ->hasExtension (Argument::any ())->willReturn (false );
334- $ container ->addResource (new FileResource (realpath (__DIR__ . '/../../Resources/config/handlebars.xml ' )))->shouldBeCalled ();
335341 $ container ->setDefinition (
336342 Argument::type ('string ' ),
337343 Argument::type ('Symfony\Component\DependencyInjection\Definition ' )
0 commit comments