protected function ResourceTestBase::grantPermissionsToTestedRole in Drupal 10
Same name in this branch
- 10 core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php \Drupal\Tests\jsonapi\Functional\ResourceTestBase::grantPermissionsToTestedRole()
- 10 core/modules/rest/tests/src/Functional/ResourceTestBase.php \Drupal\Tests\rest\Functional\ResourceTestBase::grantPermissionsToTestedRole()
Same name and namespace in other branches
- 8 core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php \Drupal\Tests\jsonapi\Functional\ResourceTestBase::grantPermissionsToTestedRole()
- 9 core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php \Drupal\Tests\jsonapi\Functional\ResourceTestBase::grantPermissionsToTestedRole()
Grants permissions to the authenticated role.
Parameters
string[] $permissions: Permissions to grant.
File
- core/
modules/ jsonapi/ tests/ src/ Functional/ ResourceTestBase.php, line 665
Class
- ResourceTestBase
- Subclass this for every JSON:API resource type.
Namespace
Drupal\Tests\jsonapi\FunctionalCode
protected function grantPermissionsToTestedRole(array $permissions) {
$this
->grantPermissions(Role::load(RoleInterface::AUTHENTICATED_ID), $permissions);
}