function JsonApiJsonSchemaTestTrait::getValidator
Overrides JsonSchemaTestTrait::getValidator
3 calls to JsonApiJsonSchemaTestTrait::getValidator()
- JsonApiTopLevelResourceNormalizerTest::testConfigEntityResourceObjectSchema in core/
modules/ jsonapi/ tests/ src/ Kernel/ Normalizer/ JsonApiTopLevelResourceNormalizerTest.php - Test the generated config resource object normalization against the schema.
- JsonApiTopLevelResourceNormalizerTest::testResourceObjectSchema in core/
modules/ jsonapi/ tests/ src/ Kernel/ Normalizer/ JsonApiTopLevelResourceNormalizerTest.php - Test the generated resource object normalization against the schema.
- JsonApiTopLevelResourceNormalizerTest::testTopLevelResourceWithSingleResource in core/
modules/ jsonapi/ tests/ src/ Kernel/ Normalizer/ JsonApiTopLevelResourceNormalizerTest.php
File
-
core/
modules/ jsonapi/ tests/ src/ Traits/ JsonApiJsonSchemaTestTrait.php, line 30
Class
Namespace
Drupal\Tests\jsonapi\TraitsCode
protected function getValidator() : Validator {
$uriRetriever = new UriRetriever();
$uriRetriever->setTranslation('|^' . JsonApiSpec::SUPPORTED_SPECIFICATION_JSON_SCHEMA . '#?|', sprintf('file://%s/schema.json', realpath(__DIR__ . '/../../..')));
return new Validator(new Factory(uriRetriever: $uriRetriever));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.