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()); }
/** * @return string */ public function getText() { return (string) $this->response->getBody(); }
/** * @param string $body * * @return ResponseAssertion */ public function hasBody($body) { $this->testCase->assertSame($body, (string) $this->response->getBody()); return $this; }