@@ -43,6 +43,28 @@ public function it_should_change_the_templating_services_when_enabled()
4343 * @test
4444 */
4545 public function it_should_change_the_assetic_service_when_enabled ()
46+ {
47+ $ this ->setDefinition ('templating.name_parser ' , new Definition (__CLASS__ ));
48+ $ this ->setDefinition ('templating.cache_warmer.template_paths ' , new Definition (__CLASS__ ));
49+ $ this ->setDefinition ('assetic.twig_formula_loader.real ' , new Definition (__CLASS__ ));
50+ $ this ->setDefinition ('assetic.twig_formula_loader ' , new Definition (__CLASS__ ));
51+
52+ $ this ->setParameter ('boekkooi.twig_jack.exclamation ' , true );
53+
54+ $ this ->setParameter ('templating.name_parser.class ' , 'DummyNameParser ' );
55+ $ this ->setParameter ('templating.cache_warmer.template_paths.class ' , 'DummyTemplatePaths ' );
56+ $ this ->setParameter ('assetic.twig_formula_loader.class ' , 'DummyAssetic ' );
57+
58+ $ this ->compile ();
59+
60+ $ this ->assertContainerBuilderHasService ('assetic.twig_formula_loader.real ' , 'DummyAssetic ' );
61+ $ this ->assertContainerBuilderHasService ('assetic.twig_formula_loader ' , __CLASS__ );
62+ }
63+
64+ /**
65+ * @test
66+ */
67+ public function it_should_change_the_assetic_service_when_enabled_fallback ()
4668 {
4769 $ this ->setDefinition ('templating.name_parser ' , new Definition (__CLASS__ ));
4870 $ this ->setDefinition ('templating.cache_warmer.template_paths ' , new Definition (__CLASS__ ));
@@ -57,6 +79,7 @@ public function it_should_change_the_assetic_service_when_enabled()
5779 $ this ->compile ();
5880
5981 $ this ->assertContainerBuilderHasService ('assetic.twig_formula_loader ' , 'DummyAssetic ' );
82+ $ this ->assertContainerBuilderNotHasService ('assetic.twig_formula_loader.real ' );
6083 }
6184
6285 /**
0 commit comments