public function testSetBodyReturnsEarlyIfComplete() { $response = $this->response->end('foo'); $body = new Stream('php://memory', 'r+'); $response = $response->withBody($body); $this->assertEquals('foo', (string) $response->getBody()); }