function SearchPageResourceTestBase::getExpectedUnauthorizedAccessMessage

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

Overrides EntityResourceTestBase::getExpectedUnauthorizedAccessMessage

File

core/modules/search/tests/src/Functional/Rest/SearchPageResourceTestBase.php, line 96

Class

SearchPageResourceTestBase
Base class for Search page tests.

Namespace

Drupal\Tests\search\Functional\Rest

Code

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