onKernelException() public method

public onKernelException ( GetResponseForExceptionEvent $event )
$event Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent
Exemplo n.º 1
0
 public function testDoNothingWhenHtmlRequested()
 {
     $request = new Request([], [], ['_api_respond' => true]);
     $request->setRequestFormat('html');
     $eventProphecy = $this->prophesize(GetResponseForExceptionEvent::class);
     $eventProphecy->getRequest()->willReturn($request)->shouldBeCalled();
     $listener = new ExceptionListener('foo:bar');
     $listener->onKernelException($eventProphecy->reveal());
 }