function NodeResourceTestBase::getExpectedUnauthorizedAccessMessage
Same name in other branches
- 8.9.x core/modules/node/tests/src/Functional/Rest/NodeResourceTestBase.php \Drupal\Tests\node\Functional\Rest\NodeResourceTestBase::getExpectedUnauthorizedAccessMessage()
- 10 core/modules/node/tests/src/Functional/Rest/NodeResourceTestBase.php \Drupal\Tests\node\Functional\Rest\NodeResourceTestBase::getExpectedUnauthorizedAccessMessage()
- 11.x core/modules/node/tests/src/Functional/Rest/NodeResourceTestBase.php \Drupal\Tests\node\Functional\Rest\NodeResourceTestBase::getExpectedUnauthorizedAccessMessage()
Overrides EntityResourceTestBase::getExpectedUnauthorizedAccessMessage
File
-
core/
modules/ node/ tests/ src/ Functional/ Rest/ NodeResourceTestBase.php, line 217
Class
Namespace
Drupal\Tests\node\Functional\RestCode
protected function getExpectedUnauthorizedAccessMessage($method) {
if ($method === 'GET' || $method == 'PATCH' || $method == 'DELETE' || $method == 'POST') {
return "The 'access content' permission is required.";
}
return parent::getExpectedUnauthorizedAccessMessage($method);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.