Author: Samuel ROZE (samuel.roze@gmail.com)
Author: Kévin Dunglas (dunglas@gmail.com)
Inheritance: extends Symfony\Component\HttpKernel\EventListener\ExceptionListener
コード例 #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());
 }