mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-05-31 14:12:07 +05:30
Lots of fixes for tests following exceptions changes
This commit is contained in:
@@ -13,7 +13,7 @@ class ClientCredentialsTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
function testCompleteFlowMissingClientId()
|
||||
{
|
||||
$this->setExpectedException('League\OAuth2\Server\Exception\ClientException', '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.');
|
||||
$this->setExpectedException('League\OAuth2\Server\Exception\InvalidRequestException');
|
||||
|
||||
$_POST['grant_type'] = 'client_credentials';
|
||||
|
||||
@@ -27,7 +27,7 @@ class ClientCredentialsTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
function testCompleteFlowMissingClientSecret()
|
||||
{
|
||||
$this->setExpectedException('League\OAuth2\Server\Exception\ClientException', '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.');
|
||||
$this->setExpectedException('League\OAuth2\Server\Exception\InvalidRequestException');
|
||||
|
||||
$_POST = [
|
||||
'grant_type' => 'client_credentials',
|
||||
@@ -43,7 +43,7 @@ class ClientCredentialsTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
function testCompleteFlowInvalidClient()
|
||||
{
|
||||
$this->setExpectedException('League\OAuth2\Server\Exception\ClientException', 'Client authentication failed');
|
||||
$this->setExpectedException('League\OAuth2\Server\Exception\InvalidClientException');
|
||||
|
||||
$_POST = [
|
||||
'grant_type' => 'client_credentials',
|
||||
@@ -66,7 +66,7 @@ class ClientCredentialsTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
function testCompleteFlowInvalidScope()
|
||||
{
|
||||
$this->setExpectedException('League\OAuth2\Server\Exception\ClientException', 'The requested scope is invalid, unknown, or malformed. Check the "foo" scope.');
|
||||
$this->setExpectedException('League\OAuth2\Server\Exception\InvalidScopeException');
|
||||
|
||||
$_POST = [
|
||||
'grant_type' => 'client_credentials',
|
||||
|
||||
Reference in New Issue
Block a user