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

testConvertAccessDeniedException() public method

Tests converting an AccessDeniedException exception.
    public function testConvertAccessDeniedException()
    {
        $event = new GetResponseForExceptionEvent($this->mockKernel(), new Request(), HttpKernelInterface::MASTER_REQUEST, new AccessDeniedException());
        $listener = new ExceptionConverterListener();
        $listener->onKernelException($event);
        $exception = $event->getException();
        $this->assertInstanceOf('Symfony\\Component\\HttpKernel\\Exception\\AccessDeniedHttpException', $exception);
        $this->assertInstanceOf('Contao\\CoreBundle\\Exception\\AccessDeniedException', $exception->getPrevious());
    }