public function HttpCacheTest::testDoesNotAssignDefaultTtlWhenResponseHasMustRevalidateDirective in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-kernel/Tests/HttpCache/HttpCacheTest.php \Symfony\Component\HttpKernel\Tests\HttpCache\HttpCacheTest::testDoesNotAssignDefaultTtlWhenResponseHasMustRevalidateDirective()
File
- vendor/
symfony/ http-kernel/ Tests/ HttpCache/ HttpCacheTest.php, line 684
Class
Namespace
Symfony\Component\HttpKernel\Tests\HttpCacheCode
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());
}