public function RefreshTokenTest::testThatRefreshTokenIsRequired in Auth0 Single Sign On 8.2
Test that an empty refresh token will throw an exception.
File
- vendor/
auth0/ auth0-php/ tests/ API/ Authentication/ RefreshTokenTest.php, line 47
Class
- RefreshTokenTest
- Class RefreshTokenTest. Tests the \Auth0\SDK\API\Authentication::refresh_token() method.
Namespace
Auth0\Tests\API\AuthenticationCode
public function testThatRefreshTokenIsRequired() {
$env = self::getEnv();
$api = new Authentication($env['DOMAIN'], $env['APP_CLIENT_ID'], $env['APP_CLIENT_SECRET']);
try {
$api
->refresh_token(null);
$caught_exception = false;
} catch (ApiException $e) {
$caught_exception = $this
->errorHasString($e, 'Refresh token cannot be blank');
}
$this
->assertTrue($caught_exception);
}