You are here

protected function TfaTestBase::setUp in Two-factor Authentication (TFA) 8

Overrides BrowserTestBase::setUp

3 calls to TfaTestBase::setUp()
TfaConfigTest::setUp in tests/src/Functional/TfaConfigTest.php
TfaLoginTest::setUp in tests/src/Functional/TfaLoginTest.php
TfaRecoveryCodePluginTest::setUp in tests/src/Functional/TfaRecoveryCodePluginTest.php
3 methods override TfaTestBase::setUp()
TfaConfigTest::setUp in tests/src/Functional/TfaConfigTest.php
TfaLoginTest::setUp in tests/src/Functional/TfaLoginTest.php
TfaRecoveryCodePluginTest::setUp in tests/src/Functional/TfaRecoveryCodePluginTest.php

File

tests/src/Functional/TfaTestBase.php, line 47

Class

TfaTestBase
Base class for testing the Tfa module.

Namespace

Drupal\Tests\tfa\Functional

Code

protected function setUp() : void {
  parent::setUp();
  $user = $this
    ->drupalCreateUser([
    'access administration pages',
    'administer encrypt',
    'administer keys',
  ]);
  $this
    ->drupalLogin($user);
  $this
    ->generateEncryptionKey();
  $this
    ->generateEncryptionProfile();
}