function ShortcutSetResourceTestBase::getExpectedUnauthorizedAccessMessage

Same name and namespace in other branches
  1. 9 core/modules/shortcut/tests/src/Functional/Rest/ShortcutSetResourceTestBase.php \Drupal\Tests\shortcut\Functional\Rest\ShortcutSetResourceTestBase::getExpectedUnauthorizedAccessMessage()
  2. 8.9.x core/modules/shortcut/tests/src/Functional/Rest/ShortcutSetResourceTestBase.php \Drupal\Tests\shortcut\Functional\Rest\ShortcutSetResourceTestBase::getExpectedUnauthorizedAccessMessage()
  3. 10 core/modules/shortcut/tests/src/Functional/Rest/ShortcutSetResourceTestBase.php \Drupal\Tests\shortcut\Functional\Rest\ShortcutSetResourceTestBase::getExpectedUnauthorizedAccessMessage()

Overrides EntityResourceTestBase::getExpectedUnauthorizedAccessMessage

File

core/modules/shortcut/tests/src/Functional/Rest/ShortcutSetResourceTestBase.php, line 94

Class

ShortcutSetResourceTestBase
ResourceTestBase for ShortcutSet entity.

Namespace

Drupal\Tests\shortcut\Functional\Rest

Code

protected function getExpectedUnauthorizedAccessMessage($method) {
    switch ($method) {
        case 'GET':
            return "The 'access shortcuts' 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.