public function AppendStreamTest::testSeeksToPositionByReading in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/guzzlehttp/psr7/tests/AppendStreamTest.php \GuzzleHttp\Tests\Psr7\AppendStreamTest::testSeeksToPositionByReading()
File
- vendor/guzzlehttp/ psr7/ tests/ AppendStreamTest.php, line 58 
Class
Namespace
GuzzleHttp\Tests\Psr7Code
public function testSeeksToPositionByReading() {
  $a = new AppendStream([
    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));
}