ApiPlatform\Core\Tests\EventListener\RespondListenerTest::testDoNotHandleResponse PHP Method

testDoNotHandleResponse() public method

    public function testDoNotHandleResponse()
    {
        $request = new Request();
        $request->setRequestFormat('xml');
        $eventProphecy = $this->prophesize(GetResponseForControllerResultEvent::class);
        $eventProphecy->getControllerResult()->willReturn(new Response())->shouldBeCalled();
        $eventProphecy->getRequest()->willReturn($request)->shouldBeCalled();
        $listener = new RespondListener();
        $listener->onKernelView($eventProphecy->reveal());
    }