onKernelRequest() public method

Adds the request attribute to the request.
public onKernelRequest ( GetResponseEvent $event )
$event Symfony\Component\HttpKernel\Event\GetResponseEvent
 /**
  * Tests that the request attribute is not set if there is no back end user.
  */
 public function testWithoutBackendUser()
 {
     $event = new GetResponseEvent($this->mockKernel(), new Request(), HttpKernelInterface::MASTER_REQUEST);
     $listener = new BypassMaintenanceListener($this->mockSession(), false);
     $listener->onKernelRequest($event);
     $this->assertFalse($event->getRequest()->attributes->has('_bypass_maintenance'));
 }