function ResourceResponseTestTrait::getRelatedLink
Same name in other branches
- 9 core/modules/jsonapi/tests/src/Functional/ResourceResponseTestTrait.php \Drupal\Tests\jsonapi\Functional\ResourceResponseTestTrait::getRelatedLink()
- 10 core/modules/jsonapi/tests/src/Functional/ResourceResponseTestTrait.php \Drupal\Tests\jsonapi\Functional\ResourceResponseTestTrait::getRelatedLink()
- 11.x core/modules/jsonapi/tests/src/Functional/ResourceResponseTestTrait.php \Drupal\Tests\jsonapi\Functional\ResourceResponseTestTrait::getRelatedLink()
Creates a related resource link for a given resource identifier and field.
Parameters
array $resource_identifier: A resource identifier for which to create a link.
string $relationship_field_name: The relationship field for which to create a link.
Return value
string The related resource link.
3 calls to ResourceResponseTestTrait::getRelatedLink()
- ResourceResponseTestTrait::getExpectedIncludedResourceResponse in core/
modules/ jsonapi/ tests/ src/ Functional/ ResourceResponseTestTrait.php - Gets an array of expected ResourceResponses for the given include paths.
- ResourceResponseTestTrait::getRelatedResponses in core/
modules/ jsonapi/ tests/ src/ Functional/ ResourceResponseTestTrait.php - Gets an array of related responses for the given field names.
- ResourceTestBase::getExpectedRelatedResponse in core/
modules/ jsonapi/ tests/ src/ Functional/ ResourceTestBase.php - Builds an expected related ResourceResponse for the given field.
File
-
core/
modules/ jsonapi/ tests/ src/ Functional/ ResourceResponseTestTrait.php, line 414
Class
- ResourceResponseTestTrait
- Utility methods for handling resource responses.
Namespace
Drupal\Tests\jsonapi\FunctionalCode
protected static function getRelatedLink(array $resource_identifier, $relationship_field_name) {
return static::getResourceLink($resource_identifier) . "/{$relationship_field_name}";
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.