Contao\CoreBundle\Test\EventListener\PrettyErrorScreenListenerTest::testServiceUnavailableHttpException PHP Method

testServiceUnavailableHttpException() public method

Tests rendering a service unavailable HTTP exception.
    public function testServiceUnavailableHttpException()
    {
        $event = new GetResponseForExceptionEvent($this->mockKernel(), new Request(), HttpKernelInterface::MASTER_REQUEST, new ServiceUnavailableHttpException('', new ServiceUnavailableException()));
        $this->listener->onKernelException($event);
        $this->assertTrue($event->hasResponse());
        $response = $event->getResponse();
        $this->assertInstanceOf('Symfony\\Component\\HttpFoundation\\Response', $response);
        $this->assertEquals(503, $response->getStatusCode());
    }