function RestJsonApiUnsupported::setUpAuthorization
Same name in other branches
- 9 core/modules/jsonapi/tests/src/Functional/RestJsonApiUnsupported.php \Drupal\Tests\jsonapi\Functional\RestJsonApiUnsupported::setUpAuthorization()
- 10 core/modules/jsonapi/tests/src/Functional/RestJsonApiUnsupported.php \Drupal\Tests\jsonapi\Functional\RestJsonApiUnsupported::setUpAuthorization()
- 11.x core/modules/jsonapi/tests/src/Functional/RestJsonApiUnsupported.php \Drupal\Tests\jsonapi\Functional\RestJsonApiUnsupported::setUpAuthorization()
Overrides ResourceTestBase::setUpAuthorization
1 call to RestJsonApiUnsupported::setUpAuthorization()
- RestJsonApiUnsupported::testApiJsonNotSupportedInRest in core/
modules/ jsonapi/ tests/ src/ Functional/ RestJsonApiUnsupported.php - Deploying a REST resource using api_json format results in 400 responses.
File
-
core/
modules/ jsonapi/ tests/ src/ Functional/ RestJsonApiUnsupported.php, line 50
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();
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.