protected static function ResourceResponseTestTrait::isResourceIdentifier in Drupal 10
Same name and namespace in other branches
- 8 core/modules/jsonapi/tests/src/Functional/ResourceResponseTestTrait.php \Drupal\Tests\jsonapi\Functional\ResourceResponseTestTrait::isResourceIdentifier()
- 9 core/modules/jsonapi/tests/src/Functional/ResourceResponseTestTrait.php \Drupal\Tests\jsonapi\Functional\ResourceResponseTestTrait::isResourceIdentifier()
Checks if a given array is a resource identifier.
Parameters
array $data: An array to check.
Return value
bool TRUE if the array has a type and ID, FALSE otherwise.
File
- core/
modules/ jsonapi/ tests/ src/ Functional/ ResourceResponseTestTrait.php, line 277
Class
- ResourceResponseTestTrait
- Utility methods for handling resource responses.
Namespace
Drupal\Tests\jsonapi\FunctionalCode
protected static function isResourceIdentifier(array $data) {
return array_key_exists('type', $data) && array_key_exists('id', $data);
}