public function testNonExistingPageHandler() { $event = new GetResponseForExceptionEvent($this->mockKernel(), new Request(), HttpKernelInterface::MASTER_REQUEST, new AccessDeniedHttpException('', new AccessDeniedException())); $this->listener->onKernelException($event); $this->assertFalse($event->hasResponse()); }