function FeedTest::setUpAuthorization
Same name in other branches
- 9 core/modules/aggregator/tests/src/Functional/Jsonapi/FeedTest.php \Drupal\Tests\aggregator\Functional\Jsonapi\FeedTest::setUpAuthorization()
Overrides ResourceTestBase::setUpAuthorization
File
-
core/
modules/ jsonapi/ tests/ src/ Functional/ FeedTest.php, line 58
Class
- FeedTest
- JSON:API integration test for the "Feed" content entity type.
Namespace
Drupal\Tests\jsonapi\FunctionalCode
protected function setUpAuthorization($method) {
switch ($method) {
case 'GET':
$this->grantPermissionsToTestedRole([
'access news feeds',
]);
break;
case 'POST':
case 'PATCH':
case 'DELETE':
$this->grantPermissionsToTestedRole([
'administer news feeds',
]);
break;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.