mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Обновлён Codeception до версии 2.1
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
<?php
|
||||
namespace tests\codeception\api\functional\_steps;
|
||||
|
||||
use tests\codeception\api\_pages\LoginRoute;
|
||||
use tests\codeception\api\FunctionalTester;
|
||||
|
||||
class AccountSteps extends FunctionalTester {
|
||||
|
||||
public function loggedInAsActiveAccount() {
|
||||
$I = $this;
|
||||
$route = new LoginRoute($I);
|
||||
$route->login('Admin', 'password_0');
|
||||
$I->canSeeResponseIsJson();
|
||||
$I->canSeeResponseJsonMatchesJsonPath('$.jwt');
|
||||
$jwt = $I->grabDataFromResponseByJsonPath('$.jwt')[0];
|
||||
$I->amBearerAuthenticated($jwt);
|
||||
}
|
||||
|
||||
public function notLoggedIn() {
|
||||
$this->haveHttpHeader('Authorization', null);
|
||||
}
|
||||
|
||||
}
|
@@ -3,7 +3,7 @@ namespace tests\codeception\api\functional\_steps;
|
||||
|
||||
use tests\codeception\api\_pages\OauthRoute;
|
||||
|
||||
class OauthSteps extends AccountSteps {
|
||||
class OauthSteps extends \tests\codeception\api\FunctionalTester {
|
||||
|
||||
public function getAuthCode($online = true) {
|
||||
// TODO: по идее можно напрямую сделать зпись в базу, что ускорит процесс тестирования
|
||||
|
Reference in New Issue
Block a user