public function testRedirect() { $response = new HttpResponse(); $response->redirect('http://test.com'); $this->assertEquals($response->getHeaders(), ['HTTP/1.1 301 Moved Permanently', 'Location: http://test.com']); }
public function redirect($url, int $code = 302) { parent::redirect($url); $this->setStatusCode($code); }