function InternalEntitiesTest::testIncludes
Same name in other branches
- 9 core/modules/jsonapi/tests/src/Functional/InternalEntitiesTest.php \Drupal\Tests\jsonapi\Functional\InternalEntitiesTest::testIncludes()
- 8.9.x core/modules/jsonapi/tests/src/Functional/InternalEntitiesTest.php \Drupal\Tests\jsonapi\Functional\InternalEntitiesTest::testIncludes()
- 11.x core/modules/jsonapi/tests/src/Functional/InternalEntitiesTest.php \Drupal\Tests\jsonapi\Functional\InternalEntitiesTest::testIncludes()
Asserts that internal entities are not included in compound documents.
File
-
core/
modules/ jsonapi/ tests/ src/ Functional/ InternalEntitiesTest.php, line 124
Class
- InternalEntitiesTest
- Makes assertions about the JSON:API behavior for internal entities.
Namespace
Drupal\Tests\jsonapi\FunctionalCode
public function testIncludes() : void {
$document = $this->getIndividual($this->referencingEntity, [
'query' => [
'include' => 'field_internal',
],
]);
$this->assertArrayNotHasKey('included', $document, 'Internal entities should not be included in compound documents.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.