public function ClientTest::testFilterResponseSupportsStreamedResponses in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-kernel/Tests/ClientTest.php \Symfony\Component\HttpKernel\Tests\ClientTest::testFilterResponseSupportsStreamedResponses()
File
- vendor/
symfony/ http-kernel/ Tests/ ClientTest.php, line 77
Class
Namespace
Symfony\Component\HttpKernel\TestsCode
public function testFilterResponseSupportsStreamedResponses() {
$client = new Client(new TestHttpKernel());
$r = new \ReflectionObject($client);
$m = $r
->getMethod('filterResponse');
$m
->setAccessible(true);
$response = new StreamedResponse(function () {
echo 'foo';
});
$domResponse = $m
->invoke($client, $response);
$this
->assertEquals('foo', $domResponse
->getContent());
}