You are here

protected function ConfigTestResourceTestBase::getExpectedUnauthorizedAccessMessage in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestResourceTestBase.php \Drupal\Tests\config_test\Functional\Rest\ConfigTestResourceTestBase::getExpectedUnauthorizedAccessMessage()
  2. 9 core/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestResourceTestBase.php \Drupal\Tests\config_test\Functional\Rest\ConfigTestResourceTestBase::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/config/tests/config_test/tests/src/Functional/Rest/ConfigTestResourceTestBase.php, line 77

Class

ConfigTestResourceTestBase

Namespace

Drupal\Tests\config_test\Functional\Rest

Code

protected function getExpectedUnauthorizedAccessMessage($method) {
  switch ($method) {
    case 'GET':
      return "The 'view config_test' permission is required.";
    default:
      return parent::getExpectedUnauthorizedAccessMessage($method);
  }
}