public function LimitStreamTest::testReturnsSubset in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/guzzlehttp/psr7/tests/LimitStreamTest.php \GuzzleHttp\Tests\Psr7\LimitStreamTest::testReturnsSubset()
File
- vendor/
guzzlehttp/ psr7/ tests/ LimitStreamTest.php, line 27
Class
Namespace
GuzzleHttp\Tests\Psr7Code
public function testReturnsSubset() {
$body = new LimitStream(Psr7\stream_for('foo'), -1, 1);
$this
->assertEquals('oo', (string) $body);
$this
->assertTrue($body
->eof());
$body
->seek(0);
$this
->assertFalse($body
->eof());
$this
->assertEquals('oo', $body
->read(100));
$this
->assertSame('', $body
->read(1));
$this
->assertTrue($body
->eof());
}