->
method('getToken'
) ;
$listener =
new AccessListener( $tokenStorage,
$this->
createMock(AccessDecisionManagerInterface::
class),
$accessMap );
$event =
new RequestEvent($this->
createMock(HttpKernelInterface::
class),
$request, HttpKernelInterface::MAIN_REQUEST
);
$listener(new LazyResponseEvent($event));
} public function testHandleWhenTheSecurityTokenStorageHasNoToken() { $this->
expectException(AccessDeniedException::
class);
$tokenStorage =
new TokenStorage();
$request =
new Request();
$accessMap =
$this->
createMock(AccessMapInterface::
class);
$accessMap->
expects($this->
any()) ->
method('getPatterns'
)