You are here

public function CachingStreamTest::testCanSeekToEndWithSeekEnd in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/guzzlehttp/psr7/tests/CachingStreamTest.php \GuzzleHttp\Tests\Psr7\CachingStreamTest::testCanSeekToEndWithSeekEnd()

File

vendor/guzzlehttp/psr7/tests/CachingStreamTest.php, line 53

Class

CachingStreamTest
@covers GuzzleHttp\Psr7\CachingStream

Namespace

GuzzleHttp\Tests\Psr7

Code

public function testCanSeekToEndWithSeekEnd() {
  $baseStream = Psr7\stream_for(implode('', range('a', 'z')));
  $cached = new CachingStream($baseStream);
  $cached
    ->seek(0, SEEK_END);
  $this
    ->assertEquals(25, $baseStream
    ->tell());
  $this
    ->assertEquals('z', $cached
    ->read(1));
  $this
    ->assertEquals(26, $cached
    ->getSize());
}