public function CachingStreamTest::testCanSeekToEndWithSeekEnd in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/guzzlehttp/psr7/tests/CachingStreamTest.php \GuzzleHttp\Tests\Psr7\CachingStreamTest::testCanSeekToEndWithSeekEnd()
File
- vendor/
guzzlehttp/ psr7/ tests/ CachingStreamTest.php, line 53
Class
Namespace
GuzzleHttp\Tests\Psr7Code
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());
}