protected function RestJsonApiUnsupported::setUpAuthorization in Drupal 10
Same name and namespace in other branches
- 8 core/modules/jsonapi/tests/src/Functional/RestJsonApiUnsupported.php \Drupal\Tests\jsonapi\Functional\RestJsonApiUnsupported::setUpAuthorization()
- 9 core/modules/jsonapi/tests/src/Functional/RestJsonApiUnsupported.php \Drupal\Tests\jsonapi\Functional\RestJsonApiUnsupported::setUpAuthorization()
File
- core/
modules/ jsonapi/ tests/ src/ Functional/ RestJsonApiUnsupported.php, line 51
Class
- RestJsonApiUnsupported
- Ensures that the 'api_json' format is not supported by the REST module.
Namespace
Drupal\Tests\jsonapi\FunctionalCode
protected function setUpAuthorization($method) {
switch ($method) {
case 'GET':
$this
->grantPermissionsToTestedRole([
'access content',
]);
break;
default:
throw new \UnexpectedValueException();
}
}