You are here

public function RngRegistrationAccessTest::testRegisterSelfNoDefaultRules in RNG - Events and Registrations 8.2

Same name and namespace in other branches
  1. 8 tests/src/Kernel/RngRegistrationAccessTest.php \Drupal\Tests\rng\Kernel\RngRegistrationAccessTest::testRegisterSelfNoDefaultRules()
  2. 3.x tests/src/Kernel/RngRegistrationAccessTest.php \Drupal\Tests\rng\Kernel\RngRegistrationAccessTest::testRegisterSelfNoDefaultRules()

Test register self with no default rules.

File

tests/src/Kernel/RngRegistrationAccessTest.php, line 72

Class

RngRegistrationAccessTest
Tests ability to register for events..

Namespace

Drupal\Tests\rng\Kernel

Code

public function testRegisterSelfNoDefaultRules() {
  $event_meta = $this
    ->createEvent();
  $user1 = $this
    ->drupalCreateUser([
    'rng register self',
  ]);
  $this
    ->setCurrentUser($user1);
  $this
    ->assertFalse($event_meta
    ->identitiesCanRegister('user', [
    $user1
      ->id(),
  ]));
}