You are here

protected function NodeResourceTestBase::getExpectedUnauthorizedAccessMessage in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/node/tests/src/Functional/Rest/NodeResourceTestBase.php \Drupal\Tests\node\Functional\Rest\NodeResourceTestBase::getExpectedUnauthorizedAccessMessage()
  2. 9 core/modules/node/tests/src/Functional/Rest/NodeResourceTestBase.php \Drupal\Tests\node\Functional\Rest\NodeResourceTestBase::getExpectedUnauthorizedAccessMessage()

File

core/modules/node/tests/src/Functional/Rest/NodeResourceTestBase.php, line 217

Class

NodeResourceTestBase

Namespace

Drupal\Tests\node\Functional\Rest

Code

protected function getExpectedUnauthorizedAccessMessage($method) {
  if ($method === 'GET' || $method == 'PATCH' || $method == 'DELETE' || $method == 'POST') {
    return "The 'access content' permission is required.";
  }
  return parent::getExpectedUnauthorizedAccessMessage($method);
}