function SearchPageResourceTestBase::getExpectedUnauthorizedAccessMessage
Same name in other branches
- 9 core/modules/search/tests/src/Functional/Rest/SearchPageResourceTestBase.php \Drupal\Tests\search\Functional\Rest\SearchPageResourceTestBase::getExpectedUnauthorizedAccessMessage()
- 10 core/modules/search/tests/src/Functional/Rest/SearchPageResourceTestBase.php \Drupal\Tests\search\Functional\Rest\SearchPageResourceTestBase::getExpectedUnauthorizedAccessMessage()
- 11.x core/modules/search/tests/src/Functional/Rest/SearchPageResourceTestBase.php \Drupal\Tests\search\Functional\Rest\SearchPageResourceTestBase::getExpectedUnauthorizedAccessMessage()
Overrides EntityResourceTestBase::getExpectedUnauthorizedAccessMessage
File
-
core/
modules/ search/ tests/ src/ Functional/ Rest/ SearchPageResourceTestBase.php, line 88
Class
Namespace
Drupal\Tests\search\Functional\RestCode
protected function getExpectedUnauthorizedAccessMessage($method) {
if ($this->config('rest.settings')
->get('bc_entity_resource_permissions')) {
return parent::getExpectedUnauthorizedAccessMessage($method);
}
switch ($method) {
case 'GET':
return "The 'access content' permission is required.";
default:
return parent::getExpectedUnauthorizedAccessMessage($method);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.