You are here

public function StreamedResponseTest::testPrepareWithCacheHeaders in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-foundation/Tests/StreamedResponseTest.php \Symfony\Component\HttpFoundation\Tests\StreamedResponseTest::testPrepareWithCacheHeaders()

File

vendor/symfony/http-foundation/Tests/StreamedResponseTest.php, line 59

Class

StreamedResponseTest

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testPrepareWithCacheHeaders() {
  $response = new StreamedResponse(function () {
    echo 'foo';
  }, 200, array(
    'Cache-Control' => 'max-age=600, public',
  ));
  $request = Request::create('/', 'GET');
  $response
    ->prepare($request);
  $this
    ->assertEquals('max-age=600, public', $response->headers
    ->get('Cache-Control'));
}