mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-25 14:40:00 +05:30
17 lines
537 B
PHP
17 lines
537 B
PHP
|
<?php
|
||
|
|
||
|
namespace LeagueTests\Utils;
|
||
|
|
||
|
use League\OAuth2\Server\Exception\OAuthServerException;
|
||
|
|
||
|
class ExceptionTest extends \PHPUnit_Framework_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());
|
||
|
}
|
||
|
}
|