protected function MenuLinkContentResourceTestBase::getExpectedUnauthorizedAccessMessage in Drupal 8
Same name and namespace in other branches
- 9 core/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentResourceTestBase.php \Drupal\Tests\menu_link_content\Functional\Rest\MenuLinkContentResourceTestBase::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/ menu_link_content/ tests/ src/ Functional/ Rest/ MenuLinkContentResourceTestBase.php, line 215
Class
- MenuLinkContentResourceTestBase
- ResourceTestBase for MenuLinkContent entity.
Namespace
Drupal\Tests\menu_link_content\Functional\RestCode
protected function getExpectedUnauthorizedAccessMessage($method) {
if ($this
->config('rest.settings')
->get('bc_entity_resource_permissions')) {
return parent::getExpectedUnauthorizedAccessMessage($method);
}
switch ($method) {
case 'DELETE':
return "The 'administer menu' permission is required.";
default:
return parent::getExpectedUnauthorizedAccessMessage($method);
}
}