Перенесены тесты со старого authserver, исправлены ошибки в коде

This commit is contained in:
ErickSkrauch
2016-09-01 10:31:43 +03:00
parent 147c84f487
commit 9371fc32ca
15 changed files with 481 additions and 34 deletions

View File

@ -0,0 +1,24 @@
<?php
namespace tests\codeception\api\functional\_steps;
use Ramsey\Uuid\Uuid;
use tests\codeception\api\_pages\AuthserverRoute;
use tests\codeception\api\FunctionalTester;
class AuthserverSteps extends FunctionalTester {
public function amAuthenticated() {
$route = new AuthserverRoute($this);
$clientToken = Uuid::uuid4()->toString();
$route->authenticate([
'username' => 'admin',
'password' => 'password_0',
'clientToken' => $clientToken,
]);
$accessToken = $this->grabDataFromResponseByJsonPath('$.accessToken')[0];
return [$accessToken, $clientToken];
}
}