Set the response status code.
public statusCode ( integer $statusCode ) : |
||
$statusCode | integer | |
Результат |
public function testBuildingWithCustomStatusCodeAndHeaders() { $response = new Response('test'); $response->statusCode(302); $response->header('Foo', 'Bar'); $this->assertEquals('Bar', $response->headers->get('Foo')); $this->assertEquals(302, $response->getStatusCode()); }