コード例 #1
0
ファイル: ParameterResolverTest.php プロジェクト: php-lug/lug
 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));
 }