public function ResponseTest::testSetPublic

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/ResponseTest.php, line 316

Class

ResponseTest

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testSetPublic() {
  $response = new Response();
  $response
    ->setPublic();
  $this
    ->assertTrue($response->headers
    ->hasCacheControlDirective('public'));
  $this
    ->assertFalse($response->headers
    ->hasCacheControlDirective('private'));
}