function UserRegistrationRestTest::setUpAuthorization
Same name in other branches
- 9 core/modules/user/tests/src/Functional/UserRegistrationRestTest.php \Drupal\Tests\user\Functional\UserRegistrationRestTest::setUpAuthorization()
- 10 core/modules/user/tests/src/Functional/UserRegistrationRestTest.php \Drupal\Tests\user\Functional\UserRegistrationRestTest::setUpAuthorization()
Overrides ResourceTestBase::setUpAuthorization
1 call to UserRegistrationRestTest::setUpAuthorization()
- UserRegistrationRestTest::setUp in core/
modules/ user/ tests/ src/ Functional/ UserRegistrationRestTest.php
File
-
core/
modules/ user/ tests/ src/ Functional/ UserRegistrationRestTest.php, line 242
Class
- UserRegistrationRestTest
- Tests registration of user using REST.
Namespace
Drupal\Tests\user\FunctionalCode
protected function setUpAuthorization($method) : void {
switch ($method) {
case 'POST':
$this->grantPermissionsToAuthenticatedRole([
'restful post user_registration',
]);
$this->grantPermissionsToAnonymousRole([
'restful post user_registration',
]);
break;
default:
throw new \UnexpectedValueException();
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.