Реализован и оттестирован CleanupController

This commit is contained in:
ErickSkrauch
2016-11-23 23:41:33 +03:00
parent 5c8bd20761
commit 7c9e856453
6 changed files with 92 additions and 2 deletions

View File

@@ -0,0 +1,17 @@
<?php
namespace tests\codeception\common\fixtures;
use common\models\OauthAccessToken;
use yii\test\ActiveFixture;
class OauthAccessTokenFixture extends ActiveFixture {
public $modelClass = OauthAccessToken::class;
public $dataFile = '@tests/codeception/common/fixtures/data/oauth-access-tokens.php';
public $depends = [
OauthSessionFixture::class,
];
}

View File

@@ -0,0 +1,13 @@
<?php
return [
'admin-ely' => [
'access_token' => '07541285-831e-1e47-e314-b950309a6fca',
'session_id' => 1,
'expire_time' => time() + 3600,
],
'admin-ely-expired' => [
'access_token' => '2977ec21-3022-96f8-544db-2e1df936908',
'session_id' => 1,
'expire_time' => time() - 3600,
],
];

View File

@@ -6,7 +6,7 @@ return [
'name' => 'Ely.by',
'description' => 'Всем знакомое елуби',
'redirect_uri' => 'http://ely.by',
'account_id' => NULL,
'account_id' => null,
'is_trusted' => 0,
'created_at' => 1455309271,
],
@@ -16,7 +16,7 @@ return [
'name' => 'TLauncher',
'description' => 'Лучший альтернативный лаунчер для Minecraft с большим количеством версий и их модификаций, а также возмоностью входа как с лицензионным аккаунтом, так и без него.',
'redirect_uri' => '',
'account_id' => NULL,
'account_id' => null,
'is_trusted' => 0,
'created_at' => 1455318468,
],

View File

@@ -1,3 +1,10 @@
<?php
return [
'admin-ely' => [
'id' => 1,
'owner_type' => 'user',
'owner_id' => 1,
'client_id' => 'ely',
'client_redirect_uri' => 'http://ely.by/authorization/oauth',
],
];