You are here

public function ResponseListenerTest::testFilterDoesNothingForSubRequests in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-kernel/Tests/EventListener/ResponseListenerTest.php \Symfony\Component\HttpKernel\Tests\EventListener\ResponseListenerTest::testFilterDoesNothingForSubRequests()

File

vendor/symfony/http-kernel/Tests/EventListener/ResponseListenerTest.php, line 43

Class

ResponseListenerTest

Namespace

Symfony\Component\HttpKernel\Tests\EventListener

Code

public function testFilterDoesNothingForSubRequests() {
  $response = new Response('foo');
  $event = new FilterResponseEvent($this->kernel, new Request(), HttpKernelInterface::SUB_REQUEST, $response);
  $this->dispatcher
    ->dispatch(KernelEvents::RESPONSE, $event);
  $this
    ->assertEquals('', $event
    ->getResponse()->headers
    ->get('content-type'));
}