protected function ShortcutSetTest::setUpAuthorization in Drupal 10
Same name and namespace in other branches
- 8 core/modules/jsonapi/tests/src/Functional/ShortcutSetTest.php \Drupal\Tests\jsonapi\Functional\ShortcutSetTest::setUpAuthorization()
- 9 core/modules/jsonapi/tests/src/Functional/ShortcutSetTest.php \Drupal\Tests\jsonapi\Functional\ShortcutSetTest::setUpAuthorization()
File
- core/
modules/ jsonapi/ tests/ src/ Functional/ ShortcutSetTest.php, line 45
Class
- ShortcutSetTest
- JSON:API integration test for the "ShortcutSet" config entity type.
Namespace
Drupal\Tests\jsonapi\FunctionalCode
protected function setUpAuthorization($method) {
switch ($method) {
case 'GET':
$this
->grantPermissionsToTestedRole([
'access shortcuts',
]);
break;
case 'POST':
case 'PATCH':
$this
->grantPermissionsToTestedRole([
'access shortcuts',
'customize shortcut links',
]);
break;
case 'DELETE':
$this
->grantPermissionsToTestedRole([
'administer shortcuts',
]);
break;
}
}