protected function BlockResourceTestBase::getExpectedUnauthorizedAccessMessage in Drupal 9
Same name and namespace in other branches
- 8 core/modules/block/tests/src/Functional/Rest/BlockResourceTestBase.php \Drupal\Tests\block\Functional\Rest\BlockResourceTestBase::getExpectedUnauthorizedAccessMessage()
Return the expected error message.
Parameters
string $method: The HTTP method (GET, POST, PATCH, DELETE).
Return value
string The error string.
Overrides EntityResourceTestBase::getExpectedUnauthorizedAccessMessage
File
- core/
modules/ block/ tests/ src/ Functional/ Rest/ BlockResourceTestBase.php, line 134
Class
Namespace
Drupal\Tests\block\Functional\RestCode
protected function getExpectedUnauthorizedAccessMessage($method) {
switch ($method) {
case 'GET':
return "The block visibility condition 'user_role' denied access.";
default:
return parent::getExpectedUnauthorizedAccessMessage($method);
}
}