unitTestsAreRunning = true; $this->resetGetAndPost(); parent::setUp(); // Create new class $this->users = $this->initBaseClassObjectBySiteMapId(SiteMap::PUB_USER_2FA, null); $this->loginUserBeforePassChangeRedirect(); } protected function tearDown(): void { $this->logOutUnitTestUser(); $this->reloadDbTables(['mod_users']); parent::tearDown(); } public function twoFactorAuthActionLoginRequirement(): void { $this->testModuleLoginRequirement(SiteMap::PUB_USER_PASS_CHANGE); } public function testTwoFactorAuthActionDefaultAction(): void { // Default form generation ob_start(); $this->users->twoFactorAuthAction(); $pageHTML = ob_get_contents(); ob_end_clean(); $twoFactorInput = '
'; $this->assertExpected( [ 'Zutenis | Divu faktoru autentifikācija', '>Divu faktoru autentifikācija

', str_replace('%INDEX%', '1', $twoFactorInput), str_replace('%INDEX%', '2', $twoFactorInput), str_replace('%INDEX%', '3', $twoFactorInput), str_replace('%INDEX%', '4', $twoFactorInput), str_replace('%INDEX%', '5', $twoFactorInput), str_replace('%INDEX%', '6', $twoFactorInput), '