public function InternalEntitiesTest::testIncludes in JSON:API 8
Same name and namespace in other branches
- 8.2 tests/src/Functional/InternalEntitiesTest.php \Drupal\Tests\jsonapi\Functional\InternalEntitiesTest::testIncludes()
Asserts that internal entities are not included in compound documents.
File
- tests/
src/ Functional/ InternalEntitiesTest.php, line 122
Class
- InternalEntitiesTest
- Makes assertions about the JSON API behavior for internal entities.
Namespace
Drupal\Tests\jsonapi\FunctionalCode
public function testIncludes() {
$this
->skipIfIsInternalIsNotSupported();
$document = $this
->getIndividual($this->referencingEntity, [
'query' => [
'include' => 'field_internal',
],
]);
$this
->assertArrayNotHasKey('included', $document, 'Internal entities should not be included in compound documents.');
}