mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Удалена зависимость от yiisoft/yii2-codeception в пользу интегрированного в Codeception генератора REST адресов
Реорганизованы объекты Pages для Functional тестов Исправлены не переименованные тесты, оставшиеся после последнего рефакторинга
This commit is contained in:
@ -1,26 +1,18 @@
|
||||
<?php
|
||||
namespace tests\codeception\api\_pages;
|
||||
|
||||
use yii\codeception\BasePage;
|
||||
|
||||
/**
|
||||
* @property \tests\codeception\api\FunctionalTester $actor
|
||||
*/
|
||||
class OauthRoute extends BasePage {
|
||||
|
||||
public function validate($queryParams) {
|
||||
$this->route = '/oauth2/v1/validate';
|
||||
$this->actor->sendGET($this->getUrl($queryParams));
|
||||
$this->getActor()->sendGET('/oauth2/v1/validate', $queryParams);
|
||||
}
|
||||
|
||||
public function complete($queryParams = [], $postParams = []) {
|
||||
$this->route = '/oauth2/v1/complete';
|
||||
$this->actor->sendPOST($this->getUrl($queryParams), $postParams);
|
||||
$this->getActor()->sendPOST('/oauth2/v1/complete?' . http_build_query($queryParams), $postParams);
|
||||
}
|
||||
|
||||
public function issueToken($postParams = []) {
|
||||
$this->route = '/oauth2/v1/token';
|
||||
$this->actor->sendPOST($this->getUrl(), $postParams);
|
||||
$this->getActor()->sendPOST('/oauth2/v1/token', $postParams);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user