function FeedResourceTestBase::getExpectedUnauthorizedAccessMessage

Same name and namespace in other branches
  1. 8.9.x core/modules/aggregator/tests/src/Functional/Rest/FeedResourceTestBase.php \Drupal\Tests\aggregator\Functional\Rest\FeedResourceTestBase::getExpectedUnauthorizedAccessMessage()

Overrides EntityResourceTestBase::getExpectedUnauthorizedAccessMessage

File

core/modules/aggregator/tests/src/Functional/Rest/FeedResourceTestBase.php, line 182

Class

FeedResourceTestBase

Namespace

Drupal\Tests\aggregator\Functional\Rest

Code

protected function getExpectedUnauthorizedAccessMessage($method) {
  switch ($method) {
    case 'GET':
      return "The 'access news feeds' permission is required.";
    case 'POST':
    case 'PATCH':
    case 'DELETE':
      return "The 'administer news feeds' permission is required.";
    default:
      return parent::getExpectedUnauthorizedAccessMessage($method);
  }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.