public function SurrogateListenerTest::testFilterWhenThereIsNoEsiIncludes in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-kernel/Tests/EventListener/SurrogateListenerTest.php \Symfony\Component\HttpKernel\Tests\EventListener\SurrogateListenerTest::testFilterWhenThereIsNoEsiIncludes()
File
- vendor/
symfony/ http-kernel/ Tests/ EventListener/ SurrogateListenerTest.php, line 53
Class
Namespace
Symfony\Component\HttpKernel\Tests\EventListenerCode
public function testFilterWhenThereIsNoEsiIncludes() {
$dispatcher = new EventDispatcher();
$kernel = $this
->getMock('Symfony\\Component\\HttpKernel\\HttpKernelInterface');
$response = new Response('foo');
$listener = new SurrogateListener(new Esi());
$dispatcher
->addListener(KernelEvents::RESPONSE, array(
$listener,
'onKernelResponse',
));
$event = new FilterResponseEvent($kernel, new Request(), HttpKernelInterface::MASTER_REQUEST, $response);
$dispatcher
->dispatch(KernelEvents::RESPONSE, $event);
$this
->assertEquals('', $event
->getResponse()->headers
->get('Surrogate-Control'));
}