2016-02-14 20:50:10 +03:00
|
|
|
<?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 = ['oauth/validate'];
|
|
|
|
$this->actor->sendGET($this->getUrl($queryParams));
|
|
|
|
}
|
|
|
|
|
|
|
|
public function complete($queryParams = [], $postParams = []) {
|
|
|
|
$this->route = ['oauth/complete'];
|
|
|
|
$this->actor->sendPOST($this->getUrl($queryParams), $postParams);
|
|
|
|
}
|
|
|
|
|
2016-02-23 00:49:46 +03:00
|
|
|
public function issueToken($postParams = []) {
|
|
|
|
$this->route = ['oauth/issue-token'];
|
|
|
|
$this->actor->sendPOST($this->getUrl(), $postParams);
|
|
|
|
}
|
|
|
|
|
2016-02-14 20:50:10 +03:00
|
|
|
}
|