You are here

protected function SchemataBrowserTestBase::getRawSchemaByOptions in Schemata 8

Requests a Schema via HTTP, ready for session assertions.

Parameters

string $format: The described format.

string $entity_type_id: Then entity type.

string|null $bundle_id: The bundle name or NULL.

Return value

string Serialized schema contents.

1 call to SchemataBrowserTestBase::getRawSchemaByOptions()
ValidateSchemaTest::validateSchemaAsJsonSchema in tests/src/Functional/ValidateSchemaTest.php
Confirm a schema is inherently valid as a JSON Schema.

File

tests/src/Functional/SchemataBrowserTestBase.php, line 148

Class

SchemataBrowserTestBase
Sets up functional testing for Schemata.

Namespace

Drupal\Tests\schemata\Functional

Code

protected function getRawSchemaByOptions($format, $entity_type_id, $bundle_id = NULL) {
  $url = SchemaUrl::fromOptions('schema_json', $format, $entity_type_id, $bundle_id)
    ->toString();
  return $this
    ->drupalGet($url);
}