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

testConvertDerivedPageNotFoundException() public method

Tests converting the derived PageNotFoundException exception.
    public function testConvertDerivedPageNotFoundException()
    {
        $event = new GetResponseForExceptionEvent($this->mockKernel(), new Request(), HttpKernelInterface::MASTER_REQUEST, new DerivedPageNotFoundException());
        $listener = new ExceptionConverterListener();
        $listener->onKernelException($event);
        $exception = $event->getException();
        $this->assertInstanceOf('Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException', $exception);
        $this->assertInstanceOf('Contao\\CoreBundle\\Exception\\PageNotFoundException', $exception->getPrevious());
    }