Contao\CoreBundle\Test\EventListener\ExceptionConverterListenerTest::testConvertServiceUnavailableException PHP Method

testConvertServiceUnavailableException() public method

Tests converting an ServiceUnavailableException exception.
    public function testConvertServiceUnavailableException()
    {
        $event = new GetResponseForExceptionEvent($this->mockKernel(), new Request(), HttpKernelInterface::MASTER_REQUEST, new ServiceUnavailableException());
        $listener = new ExceptionConverterListener();
        $listener->onKernelException($event);
        $exception = $event->getException();
        $this->assertInstanceOf('Symfony\\Component\\HttpKernel\\Exception\\ServiceUnavailableHttpException', $exception);
        $this->assertInstanceOf('Lexik\\Bundle\\MaintenanceBundle\\Exception\\ServiceUnavailableException', $exception->getPrevious());
    }