public function testFromString() { $content = <<<EOF This is the body. More body! EOF; $response = new Response(); $response->fromString(<<<EOF HTTP/1.0 200 OK Content-Type: text/plain {$content} EOF ); $this->assertEquals(2, count($response->getHeaders())); $this->assertEquals($content, $response->getContent()); }