public function InternalEntitiesTest::testEntryPoint in JSON:API 8
Same name and namespace in other branches
- 8.2 tests/src/Functional/InternalEntitiesTest.php \Drupal\Tests\jsonapi\Functional\InternalEntitiesTest::testEntryPoint()
Ensures that internal resources types aren't present in the entry point.
File
- tests/
src/ Functional/ InternalEntitiesTest.php, line 88
Class
- InternalEntitiesTest
- Makes assertions about the JSON API behavior for internal entities.
Namespace
Drupal\Tests\jsonapi\FunctionalCode
public function testEntryPoint() {
$this
->skipIfIsInternalIsNotSupported();
$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.');
}