public function CachingStreamTest::testCanSeekNearEndWithSeekEnd in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/guzzlehttp/psr7/tests/CachingStreamTest.php \GuzzleHttp\Tests\Psr7\CachingStreamTest::testCanSeekNearEndWithSeekEnd()
File
- vendor/
guzzlehttp/ psr7/ tests/ CachingStreamTest.php, line 43
Class
Namespace
GuzzleHttp\Tests\Psr7Code
public function testCanSeekNearEndWithSeekEnd() {
$baseStream = Psr7\stream_for(implode('', range('a', 'z')));
$cached = new CachingStream($baseStream);
$cached
->seek(1, SEEK_END);
$this
->assertEquals(24, $baseStream
->tell());
$this
->assertEquals('y', $cached
->read(1));
$this
->assertEquals(26, $cached
->getSize());
}