function TermTest::getExpectedUnauthorizedAccessMessage
Same name in other branches
- 8.9.x core/modules/jsonapi/tests/src/Functional/TermTest.php \Drupal\Tests\jsonapi\Functional\TermTest::getExpectedUnauthorizedAccessMessage()
- 10 core/modules/jsonapi/tests/src/Functional/TermTest.php \Drupal\Tests\jsonapi\Functional\TermTest::getExpectedUnauthorizedAccessMessage()
- 11.x core/modules/jsonapi/tests/src/Functional/TermTest.php \Drupal\Tests\jsonapi\Functional\TermTest::getExpectedUnauthorizedAccessMessage()
Overrides ResourceTestBase::getExpectedUnauthorizedAccessMessage
File
-
core/
modules/ jsonapi/ tests/ src/ Functional/ TermTest.php, line 366
Class
- TermTest
- JSON:API integration test for the "Term" content entity type.
Namespace
Drupal\Tests\jsonapi\FunctionalCode
protected function getExpectedUnauthorizedAccessMessage($method) {
switch ($method) {
case 'GET':
return "The 'access content' permission is required and the taxonomy term must be published.";
case 'POST':
return "The following permissions are required: 'create terms in camelids' OR 'administer taxonomy'.";
case 'PATCH':
return "The following permissions are required: 'edit terms in camelids' OR 'administer taxonomy'.";
case 'DELETE':
return "The following permissions are required: 'delete terms in camelids' OR 'administer taxonomy'.";
default:
return parent::getExpectedUnauthorizedAccessMessage($method);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.