mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Реорганизован процесс авторизации для функциональных тестов
This commit is contained in:
@@ -7,12 +7,12 @@ use tests\codeception\api\FunctionalTester;
|
||||
|
||||
class AuthserverSteps extends FunctionalTester {
|
||||
|
||||
public function amAuthenticated() {
|
||||
public function amAuthenticated(string $asUsername = 'admin', string $password = 'password_0') {
|
||||
$route = new AuthserverRoute($this);
|
||||
$clientToken = Uuid::uuid4()->toString();
|
||||
$route->authenticate([
|
||||
'username' => 'admin',
|
||||
'password' => 'password_0',
|
||||
'username' => $asUsername,
|
||||
'password' => $password,
|
||||
'clientToken' => $clientToken,
|
||||
]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user