public function testErrorResponse() { $response = new Response('demo', 403); $this->assertEquals($response->getStatusCode(), 403); }
/** * Constructor. * * @param mixed $content The response content, see setContent() * @param int $status The response status code * @param array $headers An array of response headers * * @throws \InvalidArgumentException When the HTTP status code is not valid * * @api */ public function __construct($content = '', $status = 200, array $headers = []) { parent::__construct($content, $status, $headers); }
public function testErrorResponse() { $response = new Response('demo', 403); print_r($response->getStatusText()); }