mirror of
https://github.com/elyby/accounts.git
synced 2024-12-12 16:39:01 +05:30
32 lines
726 B
PHP
32 lines
726 B
PHP
<?php
|
|
namespace tests\codeception\api\_pages;
|
|
|
|
use yii\codeception\BasePage;
|
|
|
|
/**
|
|
* @property \tests\codeception\api\FunctionalTester $actor
|
|
*/
|
|
class TwoFactorAuthRoute extends BasePage {
|
|
|
|
public $route = '/two-factor-auth';
|
|
|
|
public function credentials() {
|
|
$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,
|
|
]);
|
|
}
|
|
|
|
}
|