Поправлен тест для функционального теста формы смена пароля

This commit is contained in:
ErickSkrauch 2016-02-27 01:37:29 +03:00
parent 93a94c656b
commit 5be5a732bd

View File

@ -3,12 +3,13 @@ namespace tests\codeception\api\functional;
use Codeception\Scenario; use Codeception\Scenario;
use Codeception\Specify; use Codeception\Specify;
use common\models\Account;
use tests\codeception\api\_pages\AccountsRoute; use tests\codeception\api\_pages\AccountsRoute;
use tests\codeception\api\_pages\LoginRoute; use tests\codeception\api\_pages\LoginRoute;
use tests\codeception\api\functional\_steps\AccountSteps; use tests\codeception\api\functional\_steps\AccountSteps;
use tests\codeception\api\FunctionalTester; use tests\codeception\api\FunctionalTester;
class AccountsCurrentCest { class AccountsChangePasswordCest {
/** /**
* @var AccountsRoute * @var AccountsRoute
@ -19,6 +20,13 @@ class AccountsCurrentCest {
$this->route = new AccountsRoute($I); $this->route = new AccountsRoute($I);
} }
public function _after(FunctionalTester $I) {
/** @var Account $account */
$account = Account::findOne(1);
$account->setPassword('password_0');
$account->save();
}
public function testChangePassword(FunctionalTester $I, Scenario $scenario) { public function testChangePassword(FunctionalTester $I, Scenario $scenario) {
$I->wantTo('change my password'); $I->wantTo('change my password');
$I = new AccountSteps($scenario); $I = new AccountSteps($scenario);