public function testListenerSkipsSubReqs() { $listener = new ExternalRedirectListener(true); $request = Request::create('http://test.org/'); $response = new RedirectResponse('http://foo.com/'); $event = new FilterResponseEvent($this->kernel, $request, HttpKernelInterface::SUB_REQUEST, $response); $listener->onKernelResponse($event); $this->assertSame(true, $response->isRedirect()); $this->assertSame('http://foo.com/', $response->headers->get('Location')); }