'ETag' => '1234',
'Cache-Control' => 'public, s-maxage=60',
],
'Hello World',
null,
$eventDispatcher );
$this->
request('GET', '/'
);
$this->
assertHttpKernelIsCalled();
$this->
assertEquals(200,
$this->response->
getStatusCode());
$this->
assertTraceContains('miss'
);
$this->
assertTraceContains('store'
);
$this->cache->
terminate($this->request,
$this->response
);
sleep(2
);
$this->
request('GET', '/'
);
$this->
assertHttpKernelIsNotCalled();
$this->
assertEquals(200,
$this->response->
getStatusCode());
$this->
assertTraceContains('fresh'
);
$this->
assertEquals(2,
$this->response->headers->
get('Age'
));
$this->cache->
terminate($this->request,
$this->response
);