public function testDefaults() { $response = new Response(); $this->assertSame('HTTP/1.0 200 OK', $response->getStartLine()); $this->assertSame('1.0', $response->getProtocolVersion()); $this->assertSame(200, $response->getStatusCode()); $this->assertSame('OK', $response->getReasonPhrase()); $this->assertSame([], $response->getHeaders()); $this->assertSame([], $response->getCookies()); $this->assertNull($response->getBody()); }
/** * @param int $statusCode * * @return ResponseAssertion */ public function hasStatusCode($statusCode) { $this->testCase->assertSame($statusCode, $this->response->getStatusCode()); return $this; }
/** * @param int $statusCode * @param Response $response */ private function assertStatusCode($statusCode, Response $response) { $this->assertSame($statusCode, $response->getStatusCode()); }