function TourResourceTestBase::getExpectedUnauthorizedAccessMessage

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

Overrides EntityResourceTestBase::getExpectedUnauthorizedAccessMessage

File

core/modules/tour/tests/src/Functional/Rest/TourResourceTestBase.php, line 115

Class

TourResourceTestBase

Namespace

Drupal\Tests\tour\Functional\Rest

Code

protected function getExpectedUnauthorizedAccessMessage($method) {
    if ($this->config('rest.settings')
        ->get('bc_entity_resource_permissions')) {
        return parent::getExpectedUnauthorizedAccessMessage($method);
    }
    return "The following permissions are required: 'access tour' OR 'administer site configuration'.";
}

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