mirror of
https://github.com/elyby/accounts.git
synced 2024-11-19 19:53:08 +05:30
ecd92b8fda
Обновлена минимальная версия Yii2 Удалено немного хлама от Yii2 Advanced Исправлены некоторые тесты
38 lines
953 B
PHP
38 lines
953 B
PHP
<?php
|
|
namespace tests\codeception\api\functional;
|
|
|
|
use Codeception\Specify;
|
|
use tests\codeception\api\_pages\AccountsRoute;
|
|
use tests\codeception\api\FunctionalTester;
|
|
|
|
class AccountsCurrentCest {
|
|
|
|
/**
|
|
* @var AccountsRoute
|
|
*/
|
|
private $route;
|
|
|
|
public function _before(FunctionalTester $I) {
|
|
$this->route = new AccountsRoute($I);
|
|
}
|
|
|
|
public function testCurrent(FunctionalTester $I) {
|
|
$I->loggedInAsActiveAccount();
|
|
|
|
$this->route->current();
|
|
$I->canSeeResponseCodeIs(200);
|
|
$I->canSeeResponseIsJson();
|
|
$I->canSeeResponseContainsJson([
|
|
'id' => 1,
|
|
'username' => 'Admin',
|
|
'email' => 'admin@ely.by',
|
|
'lang' => 'en',
|
|
'shouldChangePassword' => false,
|
|
'isActive' => true,
|
|
'hasMojangUsernameCollision' => false,
|
|
]);
|
|
$I->canSeeResponseJsonMatchesJsonPath('$.passwordChangedAt');
|
|
}
|
|
|
|
}
|