You are here

protected function BlockResourceTestBase::getExpectedUnauthorizedAccessMessage in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/block/tests/src/Functional/Rest/BlockResourceTestBase.php \Drupal\Tests\block\Functional\Rest\BlockResourceTestBase::getExpectedUnauthorizedAccessMessage()
  2. 9 core/modules/block/tests/src/Functional/Rest/BlockResourceTestBase.php \Drupal\Tests\block\Functional\Rest\BlockResourceTestBase::getExpectedUnauthorizedAccessMessage()

File

core/modules/block/tests/src/Functional/Rest/BlockResourceTestBase.php, line 135

Class

BlockResourceTestBase

Namespace

Drupal\Tests\block\Functional\Rest

Code

protected function getExpectedUnauthorizedAccessMessage($method) {
  switch ($method) {
    case 'GET':
      return "The block visibility condition 'user_role' denied access.";
    default:
      return parent::getExpectedUnauthorizedAccessMessage($method);
  }
}