/** * Method to test rewind(). * * @return void * * @covers Asika\Http\Stream::rewind */ public function testRewind() { $this->createTempFile(); file_put_contents($this->tmpnam, 'FOO BAR'); $resource = fopen($this->tmpnam, Stream::MODE_READ_WRITE_RESET); $stream = new Stream($resource); $this->assertTrue($stream->seek(2)); $stream->rewind(); $this->assertEquals(0, $stream->tell()); }