mirror of
https://github.com/elyby/accounts.git
synced 2025-01-16 00:32:52 +05:30
Исравлен набор данных, дабы не конфликтовать с другими тестами
This commit is contained in:
parent
e0c6787e16
commit
8b86faa117
@ -81,7 +81,7 @@ class OauthAuthCodeCest {
|
|||||||
public function testCompleteActionOnWrongConditions(FunctionalTester $I) {
|
public function testCompleteActionOnWrongConditions(FunctionalTester $I) {
|
||||||
$I->loggedInAsActiveAccount();
|
$I->loggedInAsActiveAccount();
|
||||||
|
|
||||||
$I->wantTo('get accept_required if I dom\'t require any scope, but this is first time request');
|
$I->wantTo('get accept_required if I don\'t require any scope, but this is first time request');
|
||||||
$this->route->complete($this->buildQueryParams(
|
$this->route->complete($this->buildQueryParams(
|
||||||
'ely',
|
'ely',
|
||||||
'http://ely.by',
|
'http://ely.by',
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
return [
|
return [
|
||||||
'admin-ely' => [
|
'admin-test1' => [
|
||||||
'access_token' => '07541285-831e-1e47-e314-b950309a6fca',
|
'access_token' => '07541285-831e-1e47-e314-b950309a6fca',
|
||||||
'session_id' => 1,
|
'session_id' => 1,
|
||||||
'expire_time' => time() + 3600,
|
'expire_time' => time() + 3600,
|
||||||
],
|
],
|
||||||
'admin-ely-expired' => [
|
'admin-test1-expired' => [
|
||||||
'access_token' => '2977ec21-3022-96f8-544db-2e1df936908',
|
'access_token' => '2977ec21-3022-96f8-544db-2e1df936908',
|
||||||
'session_id' => 1,
|
'session_id' => 1,
|
||||||
'expire_time' => time() - 3600,
|
'expire_time' => time() - 3600,
|
||||||
|
@ -20,4 +20,14 @@ return [
|
|||||||
'is_trusted' => 0,
|
'is_trusted' => 0,
|
||||||
'created_at' => 1455318468,
|
'created_at' => 1455318468,
|
||||||
],
|
],
|
||||||
|
'test1' => [
|
||||||
|
'id' => 'test1',
|
||||||
|
'secret' => 'eEvrKHF47sqiaX94HsX-xXzdGiz3mcsq',
|
||||||
|
'name' => 'Test1',
|
||||||
|
'description' => 'Some description',
|
||||||
|
'redirect_uri' => 'http://test1.net',
|
||||||
|
'account_id' => null,
|
||||||
|
'is_trusted' => 0,
|
||||||
|
'created_at' => 1479937982,
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
return [
|
return [
|
||||||
'admin-ely' => [
|
'admin-test1' => [
|
||||||
'id' => 1,
|
'id' => 1,
|
||||||
'owner_type' => 'user',
|
'owner_type' => 'user',
|
||||||
'owner_id' => 1,
|
'owner_id' => 1,
|
||||||
'client_id' => 'ely',
|
'client_id' => 'test1',
|
||||||
'client_redirect_uri' => 'http://ely.by/authorization/oauth',
|
'client_redirect_uri' => 'http://test1.net/oauth',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
@ -17,9 +17,9 @@ class CleanupControllerTest extends TestCase {
|
|||||||
|
|
||||||
public function testActionAccessTokens() {
|
public function testActionAccessTokens() {
|
||||||
/** @var OauthAccessToken $validAccessToken */
|
/** @var OauthAccessToken $validAccessToken */
|
||||||
$validAccessToken = $this->tester->grabFixture('accessTokens', 'admin-ely');
|
$validAccessToken = $this->tester->grabFixture('accessTokens', 'admin-test1');
|
||||||
/** @var OauthAccessToken $expiredAccessToken */
|
/** @var OauthAccessToken $expiredAccessToken */
|
||||||
$expiredAccessToken = $this->tester->grabFixture('accessTokens', 'admin-ely-expired');
|
$expiredAccessToken = $this->tester->grabFixture('accessTokens', 'admin-test1-expired');
|
||||||
|
|
||||||
$controller = new CleanupController('cleanup', Yii::$app);
|
$controller = new CleanupController('cleanup', Yii::$app);
|
||||||
$this->assertEquals(0, $controller->actionAccessTokens());
|
$this->assertEquals(0, $controller->actionAccessTokens());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user