function ConfigTestResourceTestBase::getExpectedUnauthorizedAccessMessage

Same name in other branches
  1. 8.9.x core/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestResourceTestBase.php \Drupal\Tests\config_test\Functional\Rest\ConfigTestResourceTestBase::getExpectedUnauthorizedAccessMessage()
  2. 10 core/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestResourceTestBase.php \Drupal\Tests\config_test\Functional\Rest\ConfigTestResourceTestBase::getExpectedUnauthorizedAccessMessage()
  3. 11.x core/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestResourceTestBase.php \Drupal\Tests\config_test\Functional\Rest\ConfigTestResourceTestBase::getExpectedUnauthorizedAccessMessage()

Overrides EntityResourceTestBase::getExpectedUnauthorizedAccessMessage

File

core/modules/config/tests/config_test/tests/src/Functional/Rest/ConfigTestResourceTestBase.php, line 77

Class

ConfigTestResourceTestBase

Namespace

Drupal\Tests\config_test\Functional\Rest

Code

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