You are here

protected function MenuLinkContentResourceTestBase::getExpectedUnauthorizedAccessMessage in Drupal 9

Same name and namespace in other branches
  1. 8 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 222

Class

MenuLinkContentResourceTestBase
ResourceTestBase for MenuLinkContent entity.

Namespace

Drupal\Tests\menu_link_content\Functional\Rest

Code

protected function getExpectedUnauthorizedAccessMessage($method) {
  switch ($method) {
    case 'DELETE':
      return "The 'administer menu' permission is required.";
    default:
      return parent::getExpectedUnauthorizedAccessMessage($method);
  }
}