/** * Method to test getContents(). * * @return void * * @covers Asika\Http\Stream::getContents */ public function testGetContents() { $this->createTempFile(); file_put_contents($this->tmpnam, 'FOO BAR'); $resource = fopen($this->tmpnam, Stream::MODE_READ_ONLY_FROM_BEGIN); $stream = new Stream($resource); $this->assertEquals('FOO BAR', $stream->getContents()); }