Beispiel #1
0
 public function testSeeksToPositionByReading()
 {
     $a = new AppendStream(array(Psr7\stream_for('foo'), Psr7\stream_for('bar'), Psr7\stream_for('baz')));
     $a->seek(3);
     $this->assertEquals(3, $a->tell());
     $this->assertEquals('bar', $a->read(3));
     $a->seek(6);
     $this->assertEquals(6, $a->tell());
     $this->assertEquals('baz', $a->read(3));
 }