Contao\CoreBundle\Test\Exception\AjaxRedirectResponseExceptionTest::testGetResponse PHP Method

testGetResponse() public method

Tests the getResponse() method.
public testGetResponse ( )
    public function testGetResponse()
    {
        $exception = new AjaxRedirectResponseException('http://example.org');
        $response = $exception->getResponse();
        $this->assertInstanceOf('Symfony\\Component\\HttpFoundation\\Response', $response);
        $this->assertEquals(302, $response->getStatusCode());
        $this->assertEquals('http://example.org', $response->headers->get('X-Ajax-Location'));
    }
AjaxRedirectResponseExceptionTest