function ItemResourceTestBase::getExpectedUnauthorizedAccessMessage

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

Overrides EntityResourceTestBase::getExpectedUnauthorizedAccessMessage

File

core/modules/aggregator/tests/src/Functional/Rest/ItemResourceTestBase.php, line 174

Class

ItemResourceTestBase
ResourceTestBase for Item entity. @group legacy

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.