예제 #1
0
 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());
 }
예제 #2
0
 /**
  * Handles security.
  *
  * @param GetResponseEvent $event An GetResponseEvent instance
  */
 public function onKernelRequest(GetResponseEvent $event)
 {
     $this->stopwatch->start('firewallHandle');
     parent::onKernelRequest($event);
     $this->stopwatch->stop('firewallHandle');
 }