mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-05-31 14:12:07 +05:30
Removed old codecept tests
This commit is contained in:
0
tests/_output/.gitignore
vendored
0
tests/_output/.gitignore
vendored
@@ -1,10 +0,0 @@
|
||||
<?php
|
||||
namespace Codeception\Module;
|
||||
|
||||
// here you can define custom actions
|
||||
// all public methods declared in helper class will be available in $I
|
||||
|
||||
class ApiHelper extends \Codeception\Module
|
||||
{
|
||||
|
||||
}
|
@@ -1,17 +0,0 @@
|
||||
<?php
|
||||
$I = new ApiTester($scenario);
|
||||
$I->wantTo('get an access token using the client credentials grant');
|
||||
$I->sendPOST(
|
||||
'client_credentials.php/access_token',
|
||||
[
|
||||
'grant_type' => 'client_credentials',
|
||||
'client_id' => 'myawesomeapp',
|
||||
'client_secret' => 'abc123',
|
||||
'scope' => 'basic'
|
||||
]
|
||||
);
|
||||
$I->canSeeResponseCodeIs(200);
|
||||
$I->canSeeResponseIsJson();
|
||||
$I->seeResponseJsonMatchesJsonPath('$.token_type');
|
||||
$I->seeResponseJsonMatchesJsonPath('$.expires_in');
|
||||
$I->seeResponseJsonMatchesJsonPath('$.access_token');
|
@@ -1,17 +0,0 @@
|
||||
<?php
|
||||
$I = new ApiTester($scenario);
|
||||
$I->wantTo('get an access token using the client credentials grant, invalid client id');
|
||||
$I->sendPOST(
|
||||
'client_credentials.php/access_token',
|
||||
[
|
||||
'grant_type' => 'client_credentials',
|
||||
'client_id' => 'myawesomeapp-wrong',
|
||||
'client_secret' => 'foobar'
|
||||
]
|
||||
);
|
||||
$I->canSeeResponseCodeIs(401);
|
||||
$I->canSeeResponseIsJson();
|
||||
$I->seeResponseContainsJson([
|
||||
'error' => 'invalid_client',
|
||||
'message' => 'Client authentication failed.'
|
||||
]);
|
@@ -1,17 +0,0 @@
|
||||
<?php
|
||||
$I = new ApiTester($scenario);
|
||||
$I->wantTo('get an access token using the client credentials grant, invalid client secret');
|
||||
$I->sendPOST(
|
||||
'client_credentials.php/access_token',
|
||||
[
|
||||
'grant_type' => 'client_credentials',
|
||||
'client_id' => 'myawesomeapp',
|
||||
'client_secret' => 'foobar'
|
||||
]
|
||||
);
|
||||
$I->canSeeResponseCodeIs(401);
|
||||
$I->canSeeResponseIsJson();
|
||||
$I->seeResponseContainsJson([
|
||||
'error' => 'invalid_client',
|
||||
'message' => 'Client authentication failed.'
|
||||
]);
|
@@ -1,15 +0,0 @@
|
||||
<?php
|
||||
$I = new ApiTester($scenario);
|
||||
$I->wantTo('get an access token using the client credentials grant, missing client id');
|
||||
$I->sendPOST(
|
||||
'client_credentials.php/access_token',
|
||||
[
|
||||
'grant_type' => 'client_credentials'
|
||||
]
|
||||
);
|
||||
$I->canSeeResponseCodeIs(400);
|
||||
$I->canSeeResponseIsJson();
|
||||
$I->seeResponseContainsJson([
|
||||
'error' => 'invalid_request',
|
||||
'message' => 'The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "client_id" parameter.'
|
||||
]);
|
@@ -1,16 +0,0 @@
|
||||
<?php
|
||||
$I = new ApiTester($scenario);
|
||||
$I->wantTo('get an access token using the client credentials grant, missing client secret');
|
||||
$I->sendPOST(
|
||||
'client_credentials.php/access_token',
|
||||
[
|
||||
'grant_type' => 'client_credentials',
|
||||
'client_id' => 'myawesomeapp'
|
||||
]
|
||||
);
|
||||
$I->canSeeResponseCodeIs(400);
|
||||
$I->canSeeResponseIsJson();
|
||||
$I->seeResponseContainsJson([
|
||||
'error' => 'invalid_request',
|
||||
'message' => 'The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "client_secret" parameter.'
|
||||
]);
|
@@ -1,2 +0,0 @@
|
||||
<?php
|
||||
// Here you can initialize variables that will be available to your tests
|
Reference in New Issue
Block a user