function ModeratedNodeResourceTestBase::setUpAuthorization
Same name in other branches
- 9 core/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeResourceTestBase.php \Drupal\Tests\rest\Functional\EntityResource\ModeratedNode\ModeratedNodeResourceTestBase::setUpAuthorization()
- 8.9.x core/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeResourceTestBase.php \Drupal\Tests\rest\Functional\EntityResource\ModeratedNode\ModeratedNodeResourceTestBase::setUpAuthorization()
- 11.x core/modules/rest/tests/src/Functional/EntityResource/ModeratedNode/ModeratedNodeResourceTestBase.php \Drupal\Tests\rest\Functional\EntityResource\ModeratedNode\ModeratedNodeResourceTestBase::setUpAuthorization()
Overrides NodeResourceTestBase::setUpAuthorization
File
-
core/
modules/ rest/ tests/ src/ Functional/ EntityResource/ ModeratedNode/ ModeratedNodeResourceTestBase.php, line 33
Class
- ModeratedNodeResourceTestBase
- Extend the Node resource test base and apply moderation to the entity.
Namespace
Drupal\Tests\rest\Functional\EntityResource\ModeratedNodeCode
protected function setUpAuthorization($method) {
parent::setUpAuthorization($method);
switch ($method) {
case 'POST':
case 'PATCH':
case 'DELETE':
$this->grantPermissionsToTestedRole([
'use editorial transition publish',
'use editorial transition create_new_draft',
]);
break;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.