$response->headers->
set('Surrogate-Control', 'content="ESI/1.0"'
);
$this->
assertTrue($esi->
needsParsing($response));
$response =
new Response();
$this->
assertFalse($esi->
needsParsing($response));
} public function testRenderIncludeTag() { $esi =
new Esi();
$this->
assertEquals('<esi:include src="/" onerror="continue" alt="/alt" />',
$esi->
renderIncludeTag('/', '/alt', true
));
$this->
assertEquals('<esi:include src="/" alt="/alt" />',
$esi->
renderIncludeTag('/', '/alt', false
));
$this->
assertEquals('<esi:include src="/" onerror="continue" />',
$esi->
renderIncludeTag('/'
));
$this->
assertEquals('<esi:comment text="some comment" />'."\n".'<esi:include src="/" onerror="continue" alt="/alt" />',
$esi->
renderIncludeTag('/', '/alt', true, 'some comment'
));
} public function testProcessDoesNothingIfContentTypeIsNotHtml() { $esi =
new Esi();
$request = Request::
create('/'
);
$response =
new Response();