Пример #1
0
 public function testGetContentsOffset()
 {
     if ($this->stream->isReadable() && $this->stream->isSeekable()) {
         $this->assertEquals(0, $this->stream->tell());
         $this->assertEquals('foobar', $this->stream->getContents());
         $this->assertEquals(6, $this->stream->tell());
         $this->stream->seek(2);
         $this->assertEquals(2, $this->stream->tell());
         $this->assertEquals('ob', $this->stream->getContents(2));
         $this->assertEquals(4, $this->stream->tell());
     }
 }