protected function setUp() { parent::setUp(); $this->locator = $this->getMock('Symfony\\Bundle\\FrameworkBundle\\Templating\\Loader\\TemplateLocatorInterface'); $this->parser = $this->getMock('Symfony\\Component\\Templating\\TemplateNameParserInterface'); $this->loader = new FilesystemLoader($this->locator, $this->parser); }
protected function setUp() { parent::setUp(); $this->locator = $this->getMock('Symfony\\Component\\Config\\FileLocatorInterface'); $this->parser = $this->getMock('Symfony\\Component\\Templating\\TemplateNameParserInterface'); $this->loader = new FilesystemLoader($this->locator, $this->parser); $this->parser->expects($this->once())->method('parse')->with('name.format.engine')->will($this->returnValue(new TemplateReference('', '', 'name', 'format', 'engine'))); }
protected function setUp() { parent::setUp(); $this->flatten = $this->getMock('Symfony\\Component\\HttpKernel\\Exception\\FlattenException'); $this->flatten->expects($this->once())->method('getStatusCode')->will($this->returnValue(404)); $this->controller = new ExceptionController(); $this->kernel = $this->getMock('Symfony\\Component\\HttpKernel\\KernelInterface'); $this->templating = $this->getMockBuilder('Symfony\\Bundle\\TwigBundle\\TwigEngine')->disableOriginalConstructor()->getMock(); $this->templating->expects($this->any())->method('renderResponse')->will($this->returnValue($this->getMock('Symfony\\Component\\HttpFoundation\\Response'))); $this->request = Request::create('/'); $this->container = $this->getContainer(); }