You are here

protected function VocabularyResourceTestBase::getExpectedUnauthorizedAccessMessage in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/taxonomy/tests/src/Functional/Rest/VocabularyResourceTestBase.php \Drupal\Tests\taxonomy\Functional\Rest\VocabularyResourceTestBase::getExpectedUnauthorizedAccessMessage()
  2. 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

VocabularyResourceTestBase

Namespace

Drupal\Tests\taxonomy\Functional\Rest

Code

protected function getExpectedUnauthorizedAccessMessage($method) {
  if ($method === 'GET') {
    return "The following permissions are required: 'access taxonomy overview' OR 'administer taxonomy'.";
  }
  return parent::getExpectedUnauthorizedAccessMessage($method);
}