aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/api/ApiUtilsTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/api/ApiUtilsTest.php')
-rw-r--r--tests/api/ApiUtilsTest.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/api/ApiUtilsTest.php b/tests/api/ApiUtilsTest.php
index 62baf4c5..ea0ae500 100644
--- a/tests/api/ApiUtilsTest.php
+++ b/tests/api/ApiUtilsTest.php
@@ -2,13 +2,12 @@
2 2
3namespace Shaarli\Api; 3namespace Shaarli\Api;
4 4
5use Shaarli\Base64Url; 5use Shaarli\Http\Base64Url;
6
7 6
8/** 7/**
9 * Class ApiUtilsTest 8 * Class ApiUtilsTest
10 */ 9 */
11class ApiUtilsTest extends \PHPUnit_Framework_TestCase 10class ApiUtilsTest extends \PHPUnit\Framework\TestCase
12{ 11{
13 /** 12 /**
14 * Force the timezone for ISO datetimes. 13 * Force the timezone for ISO datetimes.
@@ -34,7 +33,7 @@ class ApiUtilsTest extends \PHPUnit_Framework_TestCase
34 $payload = Base64Url::encode('{ 33 $payload = Base64Url::encode('{
35 "iat": '. time() .' 34 "iat": '. time() .'
36 }'); 35 }');
37 $signature = Base64Url::encode(hash_hmac('sha512', $header .'.'. $payload , $secret, true)); 36 $signature = Base64Url::encode(hash_hmac('sha512', $header .'.'. $payload, $secret, true));
38 return $header .'.'. $payload .'.'. $signature; 37 return $header .'.'. $payload .'.'. $signature;
39 } 38 }
40 39