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-16 13:51:12 +05:30
|
|
|
public function changeEmailInitialize() {
|
|
|
|
$this->route = ['accounts/change-email-initialize'];
|
|
|
|
$this->actor->sendPOST($this->getUrl());
|
|
|
|
}
|
|
|
|
|
2016-02-24 04:04:01 +05:30
|
|
|
}
|