'status' => 200,
'body' => 'My name is Bobby.',
'headers' =>
['Cache-Control' => 's-maxage=100'
],
],
];
$this->
setNextResponses($responses);
$this->
request('GET', '/',
[],
[], true
);
$this->
assertEquals('Hello World! My name is Bobby.',
$this->response->
getContent());
$this->
assertEquals(100,
$this->response->
getTtl());
} public function testEsiCacheSendsTheLowestTtlForHeadRequests() { $responses =
[ [ 'status' => 200,
'body' => 'I am a long-lived main response, but I embed a short-lived resource: <esi:include src="/foo" />',
'headers' =>
[ 'Cache-Control' => 's-maxage=300',
'Surrogate-Control' => 'content="ESI/1.0"',
],