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