protected function ResourceTestBase::grantPermissionsToAnonymousRole in Drupal 10
Same name and namespace in other branches
- 8 core/modules/rest/tests/src/Functional/ResourceTestBase.php \Drupal\Tests\rest\Functional\ResourceTestBase::grantPermissionsToAnonymousRole()
- 9 core/modules/rest/tests/src/Functional/ResourceTestBase.php \Drupal\Tests\rest\Functional\ResourceTestBase::grantPermissionsToAnonymousRole()
Grants permissions to the anonymous role.
Parameters
string[] $permissions: Permissions to grant.
File
- core/
modules/ rest/ tests/ src/ Functional/ ResourceTestBase.php, line 294
Class
- ResourceTestBase
- Subclass this for every REST resource, every format and every auth provider.
Namespace
Drupal\Tests\rest\FunctionalCode
protected function grantPermissionsToAnonymousRole(array $permissions) {
$this
->grantPermissions(Role::load(RoleInterface::ANONYMOUS_ID), $permissions);
}