mirror of
https://github.com/elyby/accounts.git
synced 2024-11-13 00:35:57 +05:30
Исравлен набор данных, дабы не конфликтовать с другими тестами
This commit is contained in:
parent
e0c6787e16
commit
8b86faa117
@ -81,7 +81,7 @@ class OauthAuthCodeCest {
|
||||
public function testCompleteActionOnWrongConditions(FunctionalTester $I) {
|
||||
$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(
|
||||
'ely',
|
||||
'http://ely.by',
|
||||
|
@ -1,11 +1,11 @@
|
||||
<?php
|
||||
return [
|
||||
'admin-ely' => [
|
||||
'admin-test1' => [
|
||||
'access_token' => '07541285-831e-1e47-e314-b950309a6fca',
|
||||
'session_id' => 1,
|
||||
'expire_time' => time() + 3600,
|
||||
],
|
||||
'admin-ely-expired' => [
|
||||
'admin-test1-expired' => [
|
||||
'access_token' => '2977ec21-3022-96f8-544db-2e1df936908',
|
||||
'session_id' => 1,
|
||||
'expire_time' => time() - 3600,
|
||||
|
@ -20,4 +20,14 @@ return [
|
||||
'is_trusted' => 0,
|
||||
'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
|
||||
return [
|
||||
'admin-ely' => [
|
||||
'admin-test1' => [
|
||||
'id' => 1,
|
||||
'owner_type' => 'user',
|
||||
'owner_id' => 1,
|
||||
'client_id' => 'ely',
|
||||
'client_redirect_uri' => 'http://ely.by/authorization/oauth',
|
||||
'client_id' => 'test1',
|
||||
'client_redirect_uri' => 'http://test1.net/oauth',
|
||||
],
|
||||
];
|
||||
|
@ -17,9 +17,9 @@ class CleanupControllerTest extends TestCase {
|
||||
|
||||
public function testActionAccessTokens() {
|
||||
/** @var OauthAccessToken $validAccessToken */
|
||||
$validAccessToken = $this->tester->grabFixture('accessTokens', 'admin-ely');
|
||||
$validAccessToken = $this->tester->grabFixture('accessTokens', 'admin-test1');
|
||||
/** @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);
|
||||
$this->assertEquals(0, $controller->actionAccessTokens());
|
||||
|
Loading…
Reference in New Issue
Block a user