public function dispatchDoesNotSetInterceptedRequestIfAuthenticationTokensContainNoEntryPoint()
{
$this->mockActionRequest->expects($this->any())->method('isDispatched')->will($this->returnValue(true));
$mockAuthenticationToken = $this->getMockBuilder(TokenInterface::class)->getMock();
$mockAuthenticationToken->expects($this->any())->method('getAuthenticationEntryPoint')->will($this->returnValue(null));
$this->mockSecurityContext->expects($this->atLeastOnce())->method('getAuthenticationTokens')->will($this->returnValue([$mockAuthenticationToken]));
$this->mockSecurityContext->expects($this->never())->method('setInterceptedRequest')->with($this->mockMainRequest);
$this->mockFirewall->expects($this->once())->method('blockIllegalRequests')->will($this->throwException(new AuthenticationRequiredException()));
try {
$this->dispatcher->dispatch($this->mockActionRequest, $this->mockHttpResponse);
} catch (AuthenticationRequiredException $exception) {
}
}