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.
This commit is contained in:
ArthurHoaro 2019-08-10 12:31:32 +02:00
parent ef02885753
commit def39d0dd7
11 changed files with 676 additions and 566 deletions
application/api

View file

@ -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;
}
/**