protected function TermTest::getExpectedGetRelationshipDocumentData in Drupal 10
Same name and namespace in other branches
- 8 core/modules/jsonapi/tests/src/Functional/TermTest.php \Drupal\Tests\jsonapi\Functional\TermTest::getExpectedGetRelationshipDocumentData()
- 9 core/modules/jsonapi/tests/src/Functional/TermTest.php \Drupal\Tests\jsonapi\Functional\TermTest::getExpectedGetRelationshipDocumentData()
File
- core/
modules/ jsonapi/ tests/ src/ Functional/ TermTest.php, line 322
Class
- TermTest
- JSON:API integration test for the "Term" content entity type.
Namespace
Drupal\Tests\jsonapi\FunctionalCode
protected function getExpectedGetRelationshipDocumentData($relationship_field_name, EntityInterface $entity = NULL) {
$data = parent::getExpectedGetRelationshipDocumentData($relationship_field_name, $entity);
if ($relationship_field_name === 'parent') {
$data = [
0 => [
'id' => 'virtual',
'type' => 'taxonomy_term--camelids',
'meta' => [
'links' => [
'help' => [
'href' => 'https://www.drupal.org/docs/8/modules/json-api/core-concepts#virtual',
'meta' => [
'about' => "Usage and meaning of the 'virtual' resource identifier.",
],
],
],
],
],
];
}
return $data;
}