->
willReturn($token) ;
$accessDecisionManager =
$this->
createMock(AccessDecisionManagerInterface::
class);
$accessDecisionManager ->
expects($this->
once()) ->
method('decide'
) ->
with($this->
equalTo($token),
$this->
equalTo(['foo' => 'bar'
]),
$this->
equalTo($request)) ->
willReturn(false
) ;
$listener =
new AccessListener( $tokenStorage,
$accessDecisionManager,
$accessMap );
$listener(new RequestEvent($this->
createMock(HttpKernelInterface::
class),
$request, HttpKernelInterface::MAIN_REQUEST
));
} public function testHandleWhenThereIsNoAccessMapEntryMatchingTheRequest() { $request =
new Request();