public function RngRegistrationAccessTest::testRegisterSelfRuleNoRoles in RNG - Events and Registrations 8
Same name and namespace in other branches
- 8.2 tests/src/Kernel/RngRegistrationAccessTest.php \Drupal\Tests\rng\Kernel\RngRegistrationAccessTest::testRegisterSelfRuleNoRoles()
- 3.x tests/src/Kernel/RngRegistrationAccessTest.php \Drupal\Tests\rng\Kernel\RngRegistrationAccessTest::testRegisterSelfRuleNoRoles()
Test register self rule with no roles.
No roles = All roles.
File
- tests/
src/ Kernel/ RngRegistrationAccessTest.php, line 84
Class
- RngRegistrationAccessTest
- Tests ability to register for events..
Namespace
Drupal\Tests\rng\KernelCode
public function testRegisterSelfRuleNoRoles() {
$event_meta = $this
->createEvent();
$user1 = $this
->drupalCreateUser([
'rng register self',
]);
$this
->setCurrentUser($user1);
$this
->createUserRoleRules([], [
'create' => TRUE,
]);
$this
->assertTrue($event_meta
->identitiesCanRegister('user', [
$user1
->id(),
]));
}