2016-02-24 04:04:01 +05:30
|
|
|
<?php
|
|
|
|
namespace tests\codeception\api\_pages;
|
|
|
|
|
|
|
|
use yii\codeception\BasePage;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @property \tests\codeception\api\FunctionalTester $actor
|
|
|
|
*/
|
2016-02-26 04:15:21 +05:30
|
|
|
class AccountsRoute extends BasePage {
|
2016-02-24 04:04:01 +05:30
|
|
|
|
|
|
|
public function current() {
|
2016-02-27 03:52:09 +05:30
|
|
|
$this->route = ['accounts/current'];
|
2016-02-24 04:04:01 +05:30
|
|
|
$this->actor->sendGET($this->getUrl());
|
|
|
|
}
|
|
|
|
|
2016-02-27 03:52:09 +05:30
|
|
|
public function changePassword($currentPassword = null, $newPassword = null, $newRePassword = null) {
|
|
|
|
$this->route = ['accounts/change-password'];
|
|
|
|
$this->actor->sendPOST($this->getUrl(), [
|
|
|
|
'password' => $currentPassword,
|
|
|
|
'newPassword' => $newPassword,
|
|
|
|
'newRePassword' => $newRePassword,
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
|
2016-03-20 04:55:26 +05:30
|
|
|
public function changeUsername($currentPassword = null, $newUsername = null) {
|
|
|
|
$this->route = ['accounts/change-username'];
|
|
|
|
$this->actor->sendPOST($this->getUrl(), [
|
|
|
|
'password' => $currentPassword,
|
|
|
|
'username' => $newUsername,
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
|
2016-05-23 23:57:09 +05:30
|
|
|
public function changeEmailInitialize($password = '') {
|
2016-05-16 13:51:12 +05:30
|
|
|
$this->route = ['accounts/change-email-initialize'];
|
2016-05-23 23:57:09 +05:30
|
|
|
$this->actor->sendPOST($this->getUrl(), [
|
|
|
|
'password' => $password,
|
|
|
|
]);
|
2016-05-16 13:51:12 +05:30
|
|
|
}
|
|
|
|
|
2016-05-17 01:39:44 +05:30
|
|
|
public function changeEmailSubmitNewEmail($key = null, $email = null) {
|
|
|
|
$this->route = ['accounts/change-email-submit-new-email'];
|
|
|
|
$this->actor->sendPOST($this->getUrl(), [
|
|
|
|
'key' => $key,
|
|
|
|
'email' => $email,
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function changeEmailConfirmNewEmail($key = null) {
|
|
|
|
$this->route = ['accounts/change-email-confirm-new-email'];
|
|
|
|
$this->actor->sendPOST($this->getUrl(), [
|
|
|
|
'key' => $key,
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
|
2016-05-19 03:40:05 +05:30
|
|
|
public function changeLang($lang = null) {
|
|
|
|
$this->route = ['accounts/change-lang'];
|
|
|
|
$this->actor->sendPOST($this->getUrl(), [
|
|
|
|
'lang' => $lang,
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
|
2016-02-24 04:04:01 +05:30
|
|
|
}
|