Добавлены тесты для включения/отключения 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

@@ -8,9 +8,24 @@ use yii\codeception\BasePage;
*/
class TwoFactorAuthRoute extends BasePage {
public $route = '/two-factor-auth';
public function credentials() {
$this->route = '/two-factor-auth';
$this->actor->sendGET($this->getUrl());
}
public function enable($token = null, $password = null) {
$this->actor->sendPOST($this->getUrl(), [
'token' => $token,
'password' => $password,
]);
}
public function disable($token = null, $password = null) {
$this->actor->sendDELETE($this->getUrl(), [
'token' => $token,
'password' => $password,
]);
}
}