public function testCanDeserializeResponseWithoutBody() { $text = "HTTP/1.0 204\r\nX-Foo-Bar: Baz"; $response = Serializer::fromString($text); $this->assertInstanceOf('Psr\\Http\\Message\\ResponseInterface', $response); $this->assertInstanceOf('Phly\\Http\\Response', $response); $this->assertTrue($response->hasHeader('X-Foo-Bar')); $this->assertEquals('Baz', $response->getHeaderLine('X-Foo-Bar')); $body = $response->getBody()->getContents(); $this->assertEmpty($body); }