diff --git a/tests/codeception/api/functional/OauthAuthCodeCest.php b/tests/codeception/api/functional/OauthAuthCodeCest.php index 5f291db..2ed740f 100644 --- a/tests/codeception/api/functional/OauthAuthCodeCest.php +++ b/tests/codeception/api/functional/OauthAuthCodeCest.php @@ -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', diff --git a/tests/codeception/common/fixtures/data/oauth-access-tokens.php b/tests/codeception/common/fixtures/data/oauth-access-tokens.php index a5dd1db..3bcfe18 100644 --- a/tests/codeception/common/fixtures/data/oauth-access-tokens.php +++ b/tests/codeception/common/fixtures/data/oauth-access-tokens.php @@ -1,11 +1,11 @@ [ + '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, diff --git a/tests/codeception/common/fixtures/data/oauth-clients.php b/tests/codeception/common/fixtures/data/oauth-clients.php index 2ca68b2..e7ddba5 100644 --- a/tests/codeception/common/fixtures/data/oauth-clients.php +++ b/tests/codeception/common/fixtures/data/oauth-clients.php @@ -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, + ], ]; diff --git a/tests/codeception/common/fixtures/data/oauth-sessions.php b/tests/codeception/common/fixtures/data/oauth-sessions.php index 42d2ea2..ebbc2d2 100644 --- a/tests/codeception/common/fixtures/data/oauth-sessions.php +++ b/tests/codeception/common/fixtures/data/oauth-sessions.php @@ -1,10 +1,10 @@ [ + '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', ], ]; diff --git a/tests/codeception/console/unit/controllers/CleanupControllerTest.php b/tests/codeception/console/unit/controllers/CleanupControllerTest.php index ddae0ee..bcb0cef 100644 --- a/tests/codeception/console/unit/controllers/CleanupControllerTest.php +++ b/tests/codeception/console/unit/controllers/CleanupControllerTest.php @@ -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());