Добавлены тесты для включения/отключения OTP

This commit is contained in:
ErickSkrauch
2017-01-23 02:07:29 +03:00
parent be4c7908b2
commit 6aab2592b4
8 changed files with 281 additions and 8 deletions

View File

@@ -61,7 +61,7 @@ class TwoFactorAuthForm extends ApiForm {
}
public function activate(): bool {
if (!$this->validate()) {
if ($this->scenario !== self::SCENARIO_ACTIVATE || !$this->validate()) {
return false;
}
@@ -75,7 +75,7 @@ class TwoFactorAuthForm extends ApiForm {
}
public function disable(): bool {
if (!$this->validate()) {
if ($this->scenario !== self::SCENARIO_DISABLE || !$this->validate()) {
return false;
}