Обновлён Codeception до версии 2.1

This commit is contained in:
ErickSkrauch
2016-05-10 15:07:32 +03:00
parent 455d7b9469
commit ce2e68faf6
19 changed files with 149 additions and 80 deletions

View File

@@ -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');