Исравлен набор данных, дабы не конфликтовать с другими тестами

This commit is contained in:
ErickSkrauch 2016-11-24 00:59:44 +03:00
parent e0c6787e16
commit 8b86faa117
5 changed files with 18 additions and 8 deletions

View File

@ -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',

View File

@ -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,

View File

@ -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,
],
];

View File

@ -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',
],
];

View File

@ -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());