You are here

public function GALoginTotpSetupPluginTest::setUp in Google Authenticator login 8

Overrides TfaTestBase::setUp

File

tests/src/Functional/GALoginTotpSetupPluginTest.php, line 52

Class

GALoginTotpSetupPluginTest
Class GALoginTotpSetupPluginTest.

Namespace

Drupal\Tests\ga_login\Functional

Code

public function setUp() {
  parent::setUp();
  $this
    ->canEnableValidationPlugin($this->validationPluginId);
  $this->userAccount = $this
    ->drupalCreateUser([
    'setup own tfa',
    'disable own tfa',
  ]);
  $this->setupPlugin = \Drupal::service('plugin.manager.tfa.setup')
    ->createInstance($this->validationPluginId . '_setup', [
    'uid' => $this->userAccount
      ->id(),
  ]);
  $this
    ->drupalLogin($this->userAccount);
}