You are here

public function HttpCacheTest::testCachesResponsesWithExplicitNoCacheDirective in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/http-kernel/Tests/HttpCache/HttpCacheTest.php \Symfony\Component\HttpKernel\Tests\HttpCache\HttpCacheTest::testCachesResponsesWithExplicitNoCacheDirective()

File

vendor/symfony/http-kernel/Tests/HttpCache/HttpCacheTest.php, line 409

Class

HttpCacheTest

Namespace

Symfony\Component\HttpKernel\Tests\HttpCache

Code

public function testCachesResponsesWithExplicitNoCacheDirective() {
  $time = \DateTime::createFromFormat('U', time() + 5);
  $this
    ->setNextResponse(200, array(
    'Expires' => $time
      ->format(DATE_RFC2822),
    'Cache-Control' => 'public, no-cache',
  ));
  $this
    ->request('GET', '/');
  $this
    ->assertTraceContains('store');
  $this
    ->assertTrue($this->response->headers
    ->has('Age'));
}