public function GALoginHotpValidationPluginTest::setUp in Google Authenticator login 8
Overrides TfaTestBase::setUp
File
- tests/
src/ Functional/ GALoginHotpValidationPluginTest.php, line 63
Class
- GALoginHotpValidationPluginTest
- Class GALoginHotpValidationPluginTest.
Namespace
Drupal\Tests\ga_login\FunctionalCode
public function setUp() {
parent::setUp();
$this
->canEnableValidationPlugin($this->validationPluginId);
$this->userAccount = $this
->drupalCreateUser([
'setup own tfa',
'disable own tfa',
]);
$this->validationPlugin = \Drupal::service('plugin.manager.tfa.validation')
->createInstance($this->validationPluginId, [
'uid' => $this->userAccount
->id(),
]);
$this
->drupalLogin($this->userAccount);
$this
->setupUserHotp();
$this
->drupalLogout();
}