protected function VocabularyResourceTestBase::getExpectedUnauthorizedAccessMessage in Drupal 10
Same name and namespace in other branches
- 8 core/modules/taxonomy/tests/src/Functional/Rest/VocabularyResourceTestBase.php \Drupal\Tests\taxonomy\Functional\Rest\VocabularyResourceTestBase::getExpectedUnauthorizedAccessMessage()
- 9 core/modules/taxonomy/tests/src/Functional/Rest/VocabularyResourceTestBase.php \Drupal\Tests\taxonomy\Functional\Rest\VocabularyResourceTestBase::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/ taxonomy/ tests/ src/ Functional/ Rest/ VocabularyResourceTestBase.php, line 72
Class
Namespace
Drupal\Tests\taxonomy\Functional\RestCode
protected function getExpectedUnauthorizedAccessMessage($method) {
if ($method === 'GET') {
return "The following permissions are required: 'access taxonomy overview' OR 'administer taxonomy'.";
}
return parent::getExpectedUnauthorizedAccessMessage($method);
}