mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-22 21:19:46 +05:30
d8ece093d5
Resolves #694.
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());
|
|
}
|
|
} |