mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-22 21:19:46 +05:30
Move OAuthServerExceptionTest to appropriate folder
This commit is contained in:
parent
68c9fbd83c
commit
e4a7fea834
@ -1,17 +1,23 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace LeagueTests\Utils;
|
namespace LeagueTests\Exception;
|
||||||
|
|
||||||
use League\OAuth2\Server\Exception\OAuthServerException;
|
use League\OAuth2\Server\Exception\OAuthServerException;
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
class ExceptionTest extends \PHPUnit_Framework_TestCase
|
class OAuthServerExceptionTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testHasRedirect()
|
public function testHasRedirect()
|
||||||
{
|
{
|
||||||
$exceptionWithoutRedirect = OAuthServerException::accessDenied('Some hint');
|
|
||||||
$this->assertFalse($exceptionWithoutRedirect->hasRedirect());
|
|
||||||
|
|
||||||
$exceptionWithRedirect = OAuthServerException::accessDenied('some hint', 'https://example.com/error');
|
$exceptionWithRedirect = OAuthServerException::accessDenied('some hint', 'https://example.com/error');
|
||||||
|
|
||||||
$this->assertTrue($exceptionWithRedirect->hasRedirect());
|
$this->assertTrue($exceptionWithRedirect->hasRedirect());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testDoesNotHaveRedirect()
|
||||||
|
{
|
||||||
|
$exceptionWithoutRedirect = OAuthServerException::accessDenied('Some hint');
|
||||||
|
|
||||||
|
$this->assertFalse($exceptionWithoutRedirect->hasRedirect());
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user