function ResourceResponseTestTrait::getResourceLinks
Same name in other branches
- 9 core/modules/jsonapi/tests/src/Functional/ResourceResponseTestTrait.php \Drupal\Tests\jsonapi\Functional\ResourceResponseTestTrait::getResourceLinks()
- 10 core/modules/jsonapi/tests/src/Functional/ResourceResponseTestTrait.php \Drupal\Tests\jsonapi\Functional\ResourceResponseTestTrait::getResourceLinks()
- 11.x core/modules/jsonapi/tests/src/Functional/ResourceResponseTestTrait.php \Drupal\Tests\jsonapi\Functional\ResourceResponseTestTrait::getResourceLinks()
Creates individual resource links for a list of resource identifiers.
Parameters
array $resource_identifiers: A list of resource identifiers for which to create links.
Return value
string[] The resource links.
2 calls to ResourceResponseTestTrait::getResourceLinks()
- ResourceTestBase::getExpectedCollectionResponse in core/
modules/ jsonapi/ tests/ src/ Functional/ ResourceTestBase.php - Returns a JSON:API collection document for the expected entities.
- 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 367
Class
- ResourceResponseTestTrait
- Utility methods for handling resource responses.
Namespace
Drupal\Tests\jsonapi\FunctionalCode
protected static function getResourceLinks(array $resource_identifiers) {
return array_map([
static::class,
'getResourceLink',
], $resource_identifiers);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.