function JsonSchemaTestTrait::testSupportedTypesSchemaIsValid

Test that a valid schema is returned for the explicitly supported types.

This is in many cases an interface, which would not be normalized directly, however the schema should never return an invalid type. An empty array or a type with only a '$comment' member is valid.

@dataProvider supportedTypesDataProvider

File

core/modules/serialization/tests/src/Traits/JsonSchemaTestTrait.php, line 54

Class

JsonSchemaTestTrait
Trait for testing JSON Schema validity and fit to sample data.

Namespace

Drupal\Tests\serialization\Traits

Code

public function testSupportedTypesSchemaIsValid(string $type) : void {
  $this->doTestJsonSchemaIsValid($type, TRUE);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.