public function testOnKernelRequestWithSubRequest() { $map = $this->getMock('Symfony\\Component\\Security\\Http\\FirewallMapInterface'); $map->expects($this->never())->method('getListeners'); $event = new GetResponseEvent($this->getMock('Symfony\\Component\\HttpKernel\\HttpKernelInterface'), $this->getMock('Symfony\\Component\\HttpFoundation\\Request'), HttpKernelInterface::SUB_REQUEST); $firewall = new Firewall($map, $this->getMock('Symfony\\Component\\EventDispatcher\\EventDispatcherInterface')); $firewall->onKernelRequest($event); $this->assertFalse($event->hasResponse()); }
public function onKernelFinishRequest(FinishRequestEvent $event) { $this->stopwatch->start('firewallFinish'); parent::onKernelFinishRequest($event); $this->stopwatch->stop('firewallFinish'); }