function FileResourceTestBase::grantPermissionsToTestedRole
Overrides ResourceTestBase::grantPermissionsToTestedRole
1 call to FileResourceTestBase::grantPermissionsToTestedRole()
- FileResourceTestBase::setUpAuthorization in core/
modules/ file/ tests/ src/ Functional/ Rest/ FileResourceTestBase.php - Sets up the necessary authorization.
File
-
core/
modules/ file/ tests/ src/ Functional/ Rest/ FileResourceTestBase.php, line 68
Class
Namespace
Drupal\Tests\file\Functional\RestCode
protected function grantPermissionsToTestedRole(array $permissions) {
// testPatch() and testDelete() test the 'bc_entity_resource_permissions' BC
// layer; also call makeCurrentUserFileOwner() then.
if ($permissions === [
'restful patch entity:file',
] || $permissions === [
'restful delete entity:file',
]) {
$this->makeCurrentUserFileOwner();
}
parent::grantPermissionsToTestedRole($permissions);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.