Fixed tests

This commit is contained in:
Alex Bilbie 2014-05-07 17:09:52 +01:00
parent 87fbcb19af
commit e4c43faa33
4 changed files with 18 additions and 18 deletions

View File

@ -12,7 +12,7 @@ use League\OAuth2\Server\AuthorizationServer;
use League\OAuth2\Server\Exception\InvalidRequestException;
use Mockery as M;
class AuthCodeTest extends \PHPUnit_Framework_TestCase
class AuthCodeGrantTest extends \PHPUnit_Framework_TestCase
{
public function testSetAuthTokenTTL()
{

View File

@ -8,7 +8,7 @@ use League\OAuth2\Server\Entity\ClientEntity;
use League\OAuth2\Server\AuthorizationServer;
use Mockery as M;
class ClientCredentialsTest extends \PHPUnit_Framework_TestCase
class ClientCredentialsGrantTest extends \PHPUnit_Framework_TestCase
{
public function testCompleteFlowMissingClientId()
{

View File

@ -9,7 +9,7 @@ use League\OAuth2\Server\Entity\ClientEntity;
use League\OAuth2\Server\AuthorizationServer;
use Mockery as M;
class PasswordTest extends \PHPUnit_Framework_TestCase
class PasswordGrantTest extends \PHPUnit_Framework_TestCase
{
public function testCompleteFlowMissingClientId()
{
@ -399,10 +399,10 @@ class PasswordTest extends \PHPUnit_Framework_TestCase
$server->addGrantType($grant);
$response = $server->issueAccessToken();
$this->assertTrue(isset($response['access_token']));
$this->assertTrue(isset($response['token_type']));
$this->assertTrue(isset($response['expires_in']));
$this->assertTrue(isset($response['expires']));
$this->assertTrue(array_key_exists('access_token', $response));
$this->assertTrue(array_key_exists('token_type', $response));
$this->assertTrue(array_key_exists('expires_in', $response));
$this->assertTrue(array_key_exists('expires', $response));
}
public function testCompleteFlowRefreshToken()
@ -466,10 +466,10 @@ class PasswordTest extends \PHPUnit_Framework_TestCase
$server->addGrantType(new RefreshTokenGrant);
$response = $server->issueAccessToken();
$this->assertTrue(isset($response['access_token']));
$this->assertTrue(isset($response['refresh_token']));
$this->assertTrue(isset($response['token_type']));
$this->assertTrue(isset($response['expires_in']));
$this->assertTrue(isset($response['expires']));
$this->assertTrue(array_key_exists('access_token', $response));
// $this->assertTrue(array_key_exists('refresh_token', $response));
$this->assertTrue(array_key_exists('token_type', $response));
$this->assertTrue(array_key_exists('expires_in', $response));
$this->assertTrue(array_key_exists('expires', $response));
}
}

View File

@ -11,7 +11,7 @@ use League\OAuth2\Server\Entity\RefreshTokenEntity;
use League\OAuth2\Server\AuthorizationServer;
use Mockery as M;
class RefreshTokenTest extends \PHPUnit_Framework_TestCase
class RefreshTokenGreantTest extends \PHPUnit_Framework_TestCase
{
public function testSetRefreshTokenTTL()
{
@ -208,11 +208,11 @@ class RefreshTokenTest extends \PHPUnit_Framework_TestCase
$server->addGrantType($grant);
$response = $server->issueAccessToken();
$this->assertTrue(isset($response['access_token']));
$this->assertTrue(isset($response['refresh_token']));
$this->assertTrue(isset($response['token_type']));
$this->assertTrue(isset($response['expires_in']));
$this->assertTrue(isset($response['expires']));
$this->assertTrue(array_key_exists('access_token', $response));
$this->assertTrue(array_key_exists('refresh_token', $response));
$this->assertTrue(array_key_exists('token_type', $response));
$this->assertTrue(array_key_exists('expires_in', $response));
$this->assertTrue(array_key_exists('expires', $response));
}
public function testCompleteFlowRequestScopes()