public function FunctionsTest::testCopiesToString in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/guzzlehttp/psr7/tests/FunctionsTest.php \GuzzleHttp\Tests\Psr7\FunctionsTest::testCopiesToString()
File
- vendor/
guzzlehttp/ psr7/ tests/ FunctionsTest.php, line 10
Class
Namespace
GuzzleHttp\Tests\Psr7Code
public function testCopiesToString() {
$s = Psr7\stream_for('foobaz');
$this
->assertEquals('foobaz', Psr7\copy_to_string($s));
$s
->seek(0);
$this
->assertEquals('foo', Psr7\copy_to_string($s, 3));
$this
->assertEquals('baz', Psr7\copy_to_string($s, 3));
$this
->assertEquals('', Psr7\copy_to_string($s));
}