onKernelRequest() public method

Sets SwaggerUiAction as controller if the requested format is HTML.
public onKernelRequest ( GetResponseEvent $event )
$event Symfony\Component\HttpKernel\Event\GetResponseEvent GetResponseEvent
 /**
  * @dataProvider getParameters
  */
 public function testOnKernelRequest(Request $request, string $controller = null)
 {
     $eventProphecy = $this->prophesize(GetResponseEvent::class);
     $eventProphecy->getRequest()->willReturn($request)->shouldBeCalled();
     $listener = new SwaggerUiListener();
     $listener->onKernelRequest($eventProphecy->reveal());
     $this->assertEquals($controller, $request->attributes->get('_controller'));
 }