public function testBypassUponWrongRequestFormat()
{
$request = new Request();
$request->attributes->set('_format', 'json');
$event = new GetResponseForExceptionEvent($this->mockKernel(), $request, HttpKernelInterface::MASTER_REQUEST, new InternalServerErrorHttpException('', new InsecureInstallationException()));
/** @var PrettyErrorScreenListener|\PHPUnit_Framework_MockObject_MockObject $listener */
$listener = $this->getMockBuilder('Contao\\CoreBundle\\EventListener\\PrettyErrorScreenListener')->disableOriginalConstructor()->setMethods(['handleException'])->getMock();
$listener->expects($this->never())->method('handleException');
$listener->onKernelException($event);
}