Cleanup User Component, update tests

This commit is contained in:
ErickSkrauch
2019-07-26 17:04:57 +03:00
parent 445c234360
commit 4c2a9cc172
7 changed files with 172 additions and 155 deletions

View File

@@ -19,8 +19,9 @@ class FunctionalTester extends Actor {
throw new InvalidArgumentException("Cannot find account for username \"{$asUsername}\"");
}
$result = Yii::$app->user->createJwtAuthenticationToken($account, false);
$this->amBearerAuthenticated($result->getJwt());
$token = Yii::$app->user->createJwtAuthenticationToken($account);
$jwt = Yii::$app->user->serializeToken($token);
$this->amBearerAuthenticated($jwt);
return $account->id;
}