function SearchPageResourceTestBase::setUpAuthorization
Same name in other branches
- 9 core/modules/search/tests/src/Functional/Rest/SearchPageResourceTestBase.php \Drupal\Tests\search\Functional\Rest\SearchPageResourceTestBase::setUpAuthorization()
- 10 core/modules/search/tests/src/Functional/Rest/SearchPageResourceTestBase.php \Drupal\Tests\search\Functional\Rest\SearchPageResourceTestBase::setUpAuthorization()
- 11.x core/modules/search/tests/src/Functional/Rest/SearchPageResourceTestBase.php \Drupal\Tests\search\Functional\Rest\SearchPageResourceTestBase::setUpAuthorization()
Overrides ResourceTestBase::setUpAuthorization
File
-
core/
modules/ search/ tests/ src/ Functional/ Rest/ SearchPageResourceTestBase.php, line 28
Class
Namespace
Drupal\Tests\search\Functional\RestCode
protected function setUpAuthorization($method) {
switch ($method) {
case 'GET':
$this->grantPermissionsToTestedRole([
'access content',
]);
break;
case 'POST':
case 'PATCH':
case 'DELETE':
$this->grantPermissionsToTestedRole([
'administer search',
]);
break;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.