mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-05-31 14:12:07 +05:30
Updated unit tests
This commit is contained in:
@@ -22,4 +22,13 @@ class OAuthExceptionTest extends \PHPUnit_Framework_TestCase
|
||||
$exception->httpStatusCode = 501;
|
||||
$this->assertSame($exception->getHttpHeaders(), ['HTTP/1.1 501 Not Implemented']);
|
||||
}
|
||||
|
||||
public function testShouldRedirect()
|
||||
{
|
||||
$exception = new \League\OAuth2\Server\Exception\OAuthException();
|
||||
$exception->redirectUri = 'http://example.com/';
|
||||
$exception->errorType = 'Error';
|
||||
$this->assertTrue($exception->shouldRedirect());
|
||||
$this->assertEquals('http://example.com/?error=Error&message=An+error+occured', $exception->getRedirectUri());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user