You are here

public function UserRestrictionsTestBase::setUp in User restrictions 8

Overrides BrowserTestBase::setUp

File

tests/src/Functional/UserRestrictionsTestBase.php, line 26

Class

UserRestrictionsTestBase

Namespace

Drupal\Tests\user_restrictions\Functional

Code

public function setUp() {
  parent::setUp();
  $this->storage = \Drupal::service('entity_type.manager')
    ->getStorage('user_restrictions');

  // Allow registration by site visitors without administrator approval.
  \Drupal::configFactory()
    ->getEditable('user.settings')
    ->set('register', USER_REGISTER_VISITORS)
    ->save();
}