mirror of
https://github.com/elyby/accounts.git
synced 2026-04-26 01:02:55 +05:30
Обновлён Codeception до версии 2.1
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
<?php
|
||||
namespace tests\codeception\api\functional;
|
||||
|
||||
use Codeception\Scenario;
|
||||
use Codeception\Specify;
|
||||
use common\models\Account;
|
||||
use tests\codeception\api\_pages\AccountsRoute;
|
||||
use tests\codeception\api\_pages\LoginRoute;
|
||||
use tests\codeception\api\functional\_steps\AccountSteps;
|
||||
use tests\codeception\api\FunctionalTester;
|
||||
|
||||
class AccountsChangePasswordCest {
|
||||
@@ -20,16 +18,15 @@ class AccountsChangePasswordCest {
|
||||
$this->route = new AccountsRoute($I);
|
||||
}
|
||||
|
||||
public function _after(FunctionalTester $I) {
|
||||
public function _after() {
|
||||
/** @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) {
|
||||
$I->wantTo('change my password');
|
||||
$I = new AccountSteps($scenario);
|
||||
$I->loggedInAsActiveAccount();
|
||||
|
||||
$this->route->changePassword('password_0', 'new-password', 'new-password');
|
||||
|
||||
Reference in New Issue
Block a user