protected function FileUploadResourceTestBase::setUpAuthorization in Drupal 10
Same name and namespace in other branches
- 8 core/modules/rest/tests/src/Functional/FileUploadResourceTestBase.php \Drupal\Tests\rest\Functional\FileUploadResourceTestBase::setUpAuthorization()
- 9 core/modules/rest/tests/src/Functional/FileUploadResourceTestBase.php \Drupal\Tests\rest\Functional\FileUploadResourceTestBase::setUpAuthorization()
File
- core/
modules/ rest/ tests/ src/ Functional/ FileUploadResourceTestBase.php, line 789
Class
- FileUploadResourceTestBase
- Tests binary data file upload route.
Namespace
Drupal\Tests\rest\FunctionalCode
protected function setUpAuthorization($method) {
switch ($method) {
case 'GET':
$this
->grantPermissionsToTestedRole([
'view test entity',
]);
break;
case 'POST':
$this
->grantPermissionsToTestedRole([
'create entity_test entity_test_with_bundle entities',
'access content',
]);
break;
}
}