public function testResolveFormExplicit() { $resource = $this->createResourceMock(); $resource->expects($this->once())->method('getForm')->will($this->returnValue($form = 'form')); $this->requestStack->expects($this->once())->method('getMasterRequest')->will($this->returnValue($request = $this->createRequestMock())); $request->attributes->expects($this->once())->method('get')->with($this->identicalTo('_lug_form'), $this->identicalTo($form))->will($this->returnValue($explicitForm = 'explicit_form')); $this->assertSame($explicitForm, $this->parameterResolver->resolveForm($resource)); }