You are here

public function StreamDecoratorTraitTest::testSeeksAndTells in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/guzzlehttp/psr7/tests/StreamDecoratorTraitTest.php \GuzzleHttp\Tests\Psr7\StreamDecoratorTraitTest::testSeeksAndTells()

File

vendor/guzzlehttp/psr7/tests/StreamDecoratorTraitTest.php, line 68

Class

StreamDecoratorTraitTest
@covers GuzzleHttp\Psr7\StreamDecoratorTrait

Namespace

GuzzleHttp\Tests\Psr7

Code

public function testSeeksAndTells() {
  $this->b
    ->seek(1);
  $this
    ->assertEquals(1, $this->a
    ->tell());
  $this
    ->assertEquals(1, $this->b
    ->tell());
  $this->b
    ->seek(0);
  $this
    ->assertEquals(0, $this->a
    ->tell());
  $this
    ->assertEquals(0, $this->b
    ->tell());
  $this->b
    ->seek(0, SEEK_END);
  $this
    ->assertEquals(3, $this->a
    ->tell());
  $this
    ->assertEquals(3, $this->b
    ->tell());
}