protected function JsonapiResourceTest::grantPermissionsToTestedRole in JSON:API Resources 8
Grants permissions to the authenticated role.
Parameters
string[] $permissions: Permissions to grant.
4 calls to JsonapiResourceTest::grantPermissionsToTestedRole()
- JsonapiResourceTest::testAddCommentResource in tests/
src/ Functional/ JsonapiResourceTest.php - Tests the custom Add Comment resource.
- JsonapiResourceTest::testAddReminderResource in tests/
src/ Functional/ JsonapiResourceTest.php - Tests the custom Add Reminder resource.
- JsonapiResourceTest::testAuthorContentResource in tests/
src/ Functional/ JsonapiResourceTest.php - Tests the Author Content resource.
- JsonapiResourceTest::testFeaturedNodesResource in tests/
src/ Functional/ JsonapiResourceTest.php - Tests the custom Featured Nodes resource.
File
- tests/
src/ Functional/ JsonapiResourceTest.php, line 339
Class
- JsonapiResourceTest
- Tests JSON:API Resource processors.
Namespace
Drupal\Tests\jsonapi_resources\FunctionalCode
protected function grantPermissionsToTestedRole(array $permissions) {
$this
->grantPermissions(Role::load(RoleInterface::AUTHENTICATED_ID), $permissions);
}