Contao\CoreBundle\Exception\ResponseException::getResponse PHP Method

getResponse() public method

Returns the response object.
public getResponse ( ) : Response
return Symfony\Component\HttpFoundation\Response
    public function getResponse()
    {
        return $this->response;
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * Tests the getResponse() method.
  */
 public function testGetResponse()
 {
     $exception = new ResponseException(new Response('Hello world'));
     $this->assertInstanceOf('Symfony\\Component\\HttpFoundation\\Response', $exception->getResponse());
     $this->assertEquals(200, $exception->getResponse()->getStatusCode());
     $this->assertEquals('Hello world', $exception->getResponse()->getContent());
 }