mirror of
https://github.com/elyby/accounts.git
synced 2024-11-19 19:53:08 +05:30
2a4da87fd5
Логика проверки пароля вынесена в отдельный валидатор В composer.json докинута зависимость от php7
36 lines
987 B
PHP
36 lines
987 B
PHP
<?php
|
|
namespace tests\codeception\api\_pages;
|
|
|
|
use yii\codeception\BasePage;
|
|
|
|
/**
|
|
* @property \tests\codeception\api\FunctionalTester $actor
|
|
*/
|
|
class AuthenticationRoute extends BasePage {
|
|
|
|
public function login($login = '', $password = '') {
|
|
$this->route = ['authentication/login'];
|
|
$this->actor->sendPOST($this->getUrl(), [
|
|
'login' => $login,
|
|
'password' => $password,
|
|
]);
|
|
}
|
|
|
|
public function forgotPassword($login = '') {
|
|
$this->route = ['authentication/forgot-password'];
|
|
$this->actor->sendPOST($this->getUrl(), [
|
|
'login' => $login,
|
|
]);
|
|
}
|
|
|
|
public function recoverPassword($key = null, $newPassword = null, $newRePassword = null) {
|
|
$this->route = ['authentication/recover-password'];
|
|
$this->actor->sendPOST($this->getUrl(), [
|
|
'key' => $key,
|
|
'newPassword' => $newPassword,
|
|
'newRePassword' => $newRePassword,
|
|
]);
|
|
}
|
|
|
|
}
|