Removed old codecept tests

This commit is contained in:
Alex Bilbie 2016-02-12 17:46:30 +00:00
parent 64d4c4a38a
commit 9a8b7ec898
10 changed files with 0 additions and 183 deletions

View File

@ -1,10 +0,0 @@
actor: Tester
paths:
tests: tests
log: tests/_output
data: tests/_data
helpers: tests/_support
settings:
bootstrap: _bootstrap.php
colors: true
memory_limit: 1024M

View File

@ -1,79 +0,0 @@
<?php
namespace League\OAuth2\Server\Entities;
class AuthorizationCodeRequestEntity
{
/**
* @var string
*/
private $clientId;
/**
* @var null|string
*/
private $redirectUri;
/**
* @var null|string
*/
private $scope;
/**
* @var null|string
*/
private $state;
/**
* @return string
*/
public function getClientId()
{
return $this->clientId;
}
/**
* @return null|string
*/
public function getRedirectUri()
{
return $this->redirectUri;
}
/**
* @return null|string
*/
public function getScope()
{
return $this->scope;
}
/**
* @return null|string
*/
public function getState()
{
return $this->state;
}
/**
* AuthorizationCodeRequestEntity constructor.
*
* @param string $clientId
* @param string|null $redirectUri
* @param string|null $scope
* @param string|null $state
*/
public function __construct($clientId, $redirectUri = null, $scope = null, $state = null)
{
$this->clientId = $clientId;
$this->redirectUri = $redirectUri;
$this->scope = $scope;
$this->state = $state;
}
public function __sleep()
{
return ['clientId', 'redirectUri', 'scope', 'state'];
}
}

View File

View File

@ -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
{
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,2 +0,0 @@
<?php
// Here you can initialize variables that will be available to your tests