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()
- 8.9.x 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 35
Class
- SearchPageResourceTestBase
- Base class for Search page tests.
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.