public function testContaoPageHandler($type, \Exception $exception) { $GLOBALS['TL_PTY']['error_' . $type] = 'Contao\\PageError' . $type; $event = new GetResponseForExceptionEvent($this->mockKernel(), new Request(), HttpKernelInterface::MASTER_REQUEST, $exception); $this->listener->onKernelException($event); $this->assertTrue($event->hasResponse()); $response = $event->getResponse(); $this->assertInstanceOf('Symfony\\Component\\HttpFoundation\\Response', $response); $this->assertEquals($type, $response->getStatusCode()); unset($GLOBALS['TL_PTY']); }