ApiPlatform\Core\Tests\Bridge\Symfony\Validator\EventListener\ValidationExceptionListenerTest::testNotValidationException PHP Method

testNotValidationException() public method

    public function testNotValidationException()
    {
        $eventProphecy = $this->prophesize(GetResponseForExceptionEvent::class);
        $eventProphecy->getException()->willReturn(new \Exception())->shouldBeCalled();
        $eventProphecy->setResponse()->shouldNotBeCalled();
        $serializerProphecy = $this->prophesize(SerializerInterface::class);
        $listener = new ValidationExceptionListener($serializerProphecy->reveal(), ['hydra' => ['application/ld+json']]);
        $listener->onKernelException($eventProphecy->reveal());
    }