public function testResolveVoterExplicit() { $this->requestStack->expects($this->once())->method('getMasterRequest')->will($this->returnValue($request = $this->createRequestMock())); $request->attributes->expects($this->once())->method('get')->with($this->identicalTo('_lug_voter'), $this->identicalTo(false))->will($this->returnValue(true)); $this->assertTrue($this->parameterResolver->resolveVoter()); }