2017-01-21 04:24:30 +05:30
|
|
|
<?php
|
|
|
|
namespace tests\codeception\api\_pages;
|
|
|
|
|
|
|
|
use yii\codeception\BasePage;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @property \tests\codeception\api\FunctionalTester $actor
|
|
|
|
*/
|
|
|
|
class TwoFactorAuthRoute extends BasePage {
|
|
|
|
|
2017-01-23 04:37:29 +05:30
|
|
|
public $route = '/two-factor-auth';
|
|
|
|
|
2017-01-21 04:24:30 +05:30
|
|
|
public function credentials() {
|
|
|
|
$this->actor->sendGET($this->getUrl());
|
|
|
|
}
|
|
|
|
|
2017-01-23 04:37:29 +05:30
|
|
|
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,
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
|
2017-01-21 04:24:30 +05:30
|
|
|
}
|