/** * @expectedException \Lug\Bundle\ResourceBundle\Exception\RuntimeException * @expectedExceptionMessage The template could not be found for the route "route". */ public function testResolveTemplateMissing() { $this->requestStack->expects($this->exactly(2))->method('getMasterRequest')->will($this->returnValue($request = $this->createRequestMock())); $request->attributes->expects($this->at(0))->method('get')->with($this->identicalTo('_lug_template'), $this->isNull())->will($this->returnValue(null)); $request->attributes->expects($this->at(1))->method('get')->with($this->identicalTo('_route'), $this->isNull())->will($this->returnValue('route')); $this->parameterResolver->resolveTemplate(); }