ApiPlatform\Core\Tests\Util\ErrorFormatGuesserTest::testFallbackWhenNotSupported PHP Метод

testFallbackWhenNotSupported() публичный Метод

    public function testFallbackWhenNotSupported()
    {
        $request = new Request();
        $request->setRequestFormat('html');
        $format = ErrorFormatGuesser::guessErrorFormat($request, ['xml' => ['text/xml'], 'jsonld' => ['application/ld+json', 'application/json']]);
        $this->assertEquals('xml', $format['key']);
        $this->assertEquals('text/xml', $format['value'][0]);
    }