function it_applies_all_override_actions_to_given_template($registry, $crawlerFactory, OverrideInterface $override, ActionInterface $action1, ActionInterface $action2, Crawler $crawler) { $content = '<html><body>{{ hello }}</html></html>'; $registry->get('SyliusWebBundle:Frontend:theme.html.twig')->shouldBeCalled()->willReturn(array($override)); $crawlerFactory->createCrawler($content)->shouldBeCalled()->willReturn($crawler); $override->getActions()->shouldBeCalled()->willReturn(array($action1, $action2)); $action1->apply($crawler)->shouldBeCalled(); $action2->apply($crawler)->shouldBeCalled(); $this->process('SyliusWebBundle:Frontend:theme.html.twig', $content); }
function it_throws_exception_if_override_has_undefined_template(OverrideInterface $override) { $override->getTemplate()->shouldBeCalled()->willReturn(null); $this->shouldThrow('InvalidArgumentException')->duringAdd($override); }