mirror of
https://github.com/elyby/accounts.git
synced 2026-12-02 04:03:14 +05:30
Реорганизован процесс авторизации для функциональных тестов
This commit is contained in:
1 parent
4695b6e724
commit
fbaf48591f
21 files changed
+44
-52
No files matched your search
@@ -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