function ShortcutResourceTestBase::setUpAuthorization
Same name in other branches
- 8.9.x core/modules/shortcut/tests/src/Functional/Rest/ShortcutResourceTestBase.php \Drupal\Tests\shortcut\Functional\Rest\ShortcutResourceTestBase::setUpAuthorization()
- 10 core/modules/shortcut/tests/src/Functional/Rest/ShortcutResourceTestBase.php \Drupal\Tests\shortcut\Functional\Rest\ShortcutResourceTestBase::setUpAuthorization()
- 11.x core/modules/shortcut/tests/src/Functional/Rest/ShortcutResourceTestBase.php \Drupal\Tests\shortcut\Functional\Rest\ShortcutResourceTestBase::setUpAuthorization()
Overrides ResourceTestBase::setUpAuthorization
File
-
core/
modules/ shortcut/ tests/ src/ Functional/ Rest/ ShortcutResourceTestBase.php, line 39
Class
- ShortcutResourceTestBase
- ResourceTestBase for Shortcut entity.
Namespace
Drupal\Tests\shortcut\Functional\RestCode
protected function setUpAuthorization($method) {
switch ($method) {
case 'GET':
case 'POST':
case 'PATCH':
case 'DELETE':
$this->grantPermissionsToTestedRole([
'access shortcuts',
'customize shortcut links',
]);
break;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.