function InternalEntitiesTest::testEntryPoint
Same name in other branches
- 9 core/modules/jsonapi/tests/src/Functional/InternalEntitiesTest.php \Drupal\Tests\jsonapi\Functional\InternalEntitiesTest::testEntryPoint()
- 10 core/modules/jsonapi/tests/src/Functional/InternalEntitiesTest.php \Drupal\Tests\jsonapi\Functional\InternalEntitiesTest::testEntryPoint()
- 11.x core/modules/jsonapi/tests/src/Functional/InternalEntitiesTest.php \Drupal\Tests\jsonapi\Functional\InternalEntitiesTest::testEntryPoint()
Ensures that internal resources types aren't present in the entry point.
File
-
core/
modules/ jsonapi/ tests/ src/ Functional/ InternalEntitiesTest.php, line 92
Class
- InternalEntitiesTest
- Makes assertions about the JSON:API behavior for internal entities.
Namespace
Drupal\Tests\jsonapi\FunctionalCode
public function testEntryPoint() {
$document = $this->jsonapiGet('/jsonapi');
$this->assertArrayNotHasKey("{$this->internalEntity->getEntityTypeId()}--{$this->internalEntity->bundle()}", $document['links'], 'The entry point should not contain links to internal resource type routes.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.