public function JsonApiGeneratorTest::testGetPaths in OpenAPI for JSON:API 8.2
Same name and namespace in other branches
- 3.x tests/src/Kernel/JsonApiGeneratorTest.php \Drupal\Tests\openapi_jsonapi\Kernel\JsonApiGeneratorTest::testGetPaths()
@covers ::getPaths
File
- tests/
src/ Kernel/ JsonApiGeneratorTest.php, line 57
Class
- JsonApiGeneratorTest
- @coversDefaultClass \Drupal\openapi_jsonapi\Plugin\openapi\OpenApiGenerator\JsonApiGenerator
Namespace
Drupal\Tests\openapi_jsonapi\KernelCode
public function testGetPaths() {
// Assert that the menu_link field is defined on the test entity type.
$field_definitions = $this->container
->get('entity_field.manager')
->getFieldDefinitions('openapi_test_entity', 'test');
$this
->assertArrayHasKey('menu_link', $field_definitions);
// This should not cause any failures.
$this->container
->get('plugin.manager.openapi.generator')
->createInstance('jsonapi')
->getPaths();
}