public function PumpStreamTest::testCanReadFromCallable in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/guzzlehttp/psr7/tests/PumpStreamTest.php \GuzzleHttp\Tests\Psr7\PumpStreamTest::testCanReadFromCallable()
File
- vendor/
guzzlehttp/ psr7/ tests/ PumpStreamTest.php, line 22
Class
Namespace
GuzzleHttp\Tests\Psr7Code
public function testCanReadFromCallable() {
$p = Psr7\stream_for(function ($size) {
return 'a';
});
$this
->assertEquals('a', $p
->read(1));
$this
->assertEquals(1, $p
->tell());
$this
->assertEquals('aaaaa', $p
->read(5));
$this
->assertEquals(6, $p
->tell());
}