public function HttpCacheTest::testFetchesResponseFromBackendWhenCacheMisses 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::testFetchesResponseFromBackendWhenCacheMisses()
File
- vendor/
symfony/ http-kernel/ Tests/ HttpCache/ HttpCacheTest.php, line 366
Class
Namespace
Symfony\Component\HttpKernel\Tests\HttpCacheCode
public function testFetchesResponseFromBackendWhenCacheMisses() {
$time = \DateTime::createFromFormat('U', time() + 5);
$this
->setNextResponse(200, array(
'Cache-Control' => 'public',
'Expires' => $time
->format(DATE_RFC2822),
));
$this
->request('GET', '/');
$this
->assertEquals(200, $this->response
->getStatusCode());
$this
->assertTraceContains('miss');
$this
->assertTrue($this->response->headers
->has('Age'));
}