public function HttpCacheTest::testDoesNotAssignDefaultTtlWhenResponseHasMustRevalidateDirective

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php, line 598

Class

HttpCacheTest

Namespace

Symfony\Component\HttpKernel\Tests\HttpCache

Code

public function testDoesNotAssignDefaultTtlWhenResponseHasMustRevalidateDirective() {
  $this
    ->setNextResponse(200, array(
    'Cache-Control' => 'must-revalidate',
  ));
  $this->cacheConfig['default_ttl'] = 10;
  $this
    ->request('GET', '/');
  $this
    ->assertHttpKernelIsCalled();
  $this
    ->assertEquals(200, $this->response
    ->getStatusCode());
  $this
    ->assertTraceContains('miss');
  $this
    ->assertTraceNotContains('store');
  $this
    ->assertNotRegExp('/s-maxage/', $this->response->headers
    ->get('Cache-Control'));
  $this
    ->assertEquals('Hello World', $this->response
    ->getContent());
}