public function dispatchThrowsAnInfiniteLoopExceptionIfTheRequestCouldNotBeDispachedAfter99Iterations()
{
$requestCallCounter = 0;
$requestCallBack = function () use(&$requestCallCounter) {
return $requestCallCounter++ < 101 ? false : true;
};
$this->mockParentRequest->expects($this->any())->method('isDispatched')->will($this->returnCallBack($requestCallBack, '__invoke'));
$this->dispatcher->dispatch($this->mockParentRequest, $this->mockHttpResponse);
}