You are here

public function ClientTest::testFilterResponseSupportsStreamedResponses in Zircon Profile 8

Same name and namespace in other branches
  1. 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

ClientTest

Namespace

Symfony\Component\HttpKernel\Tests

Code

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());
}