markTestSkipped(); } } public function testCanAdaptGuzzleStreamToPsr() { $stream = new PsrStreamAdapter(GuzzleStream::factory('foo')); $this->verify($stream, 'foo'); } public function testCanAdaptPsrStreamToGuzzle() { $stream = new GuzzleStreamAdapter(Psr7\Utils::streamFor('foo')); $this->verify($stream, 'foo'); } private function verify($stream, $expected) { $str1 = ''; while (!$stream->eof()) { $str1 .= $stream->read(1); } $stream->rewind(); $str2 = $stream->getContents(); $this->assertSame($expected, $str1); $this->assertSame($expected, $str2); } }