You are here

public function ResponseTest::testSetSharedMaxAge in Zircon Profile 8

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

File

vendor/symfony/http-foundation/Tests/ResponseTest.php, line 302

Class

ResponseTest

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testSetSharedMaxAge() {
  $response = new Response();
  $response
    ->setSharedMaxAge(20);
  $cacheControl = $response->headers
    ->get('Cache-Control');
  $this
    ->assertEquals('public, s-maxage=20', $cacheControl);
}