From def39d0dd7a81a4af9ad68b62c9e9823fbc2b38e Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Sat, 10 Aug 2019 12:31:32 +0200 Subject: Run Unit Tests against PHP 7.4 Bump PHPUnit version and fix unit test - Globals are handled differently and are persistent through tests - Tests without assertions are marked as risky: some of them are just meant to check that no error is raised. --- application/api/ApiUtils.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'application/api') diff --git a/application/api/ApiUtils.php b/application/api/ApiUtils.php index 1e3ac02e..5ac07c4d 100644 --- a/application/api/ApiUtils.php +++ b/application/api/ApiUtils.php @@ -15,6 +15,8 @@ class ApiUtils * @param string $token JWT token extracted from the headers. * @param string $secret API secret set in the settings. * + * @return bool true on success + * * @throws ApiAuthorizationException the token is not valid. */ public static function validateJwtToken($token, $secret) @@ -45,6 +47,8 @@ class ApiUtils ) { throw new ApiAuthorizationException('Invalid JWT issued time'); } + + return true; } /** -- cgit v1.2.3