function testSendBodyStream() { ob_start(); $stream = fopen('php://memory', 'r+'); fwrite($stream, 'hello'); rewind($stream); $response = new Response(); $response->sendBody($stream); $this->assertEquals('hello', ob_get_clean()); }