protected function SearchPageResourceTestBase::getExpectedUnauthorizedAccessMessage in Drupal 9
Same name and namespace in other branches
- 8 core/modules/search/tests/src/Functional/Rest/SearchPageResourceTestBase.php \Drupal\Tests\search\Functional\Rest\SearchPageResourceTestBase::getExpectedUnauthorizedAccessMessage()
Return the expected error message.
Parameters
string $method: The HTTP method (GET, POST, PATCH, DELETE).
Return value
string The error string.
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) {
switch ($method) {
case 'GET':
return "The 'access content' permission is required.";
default:
return parent::getExpectedUnauthorizedAccessMessage($method);
}
}