jwt : pass the not needed method to private

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@5284 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2019-05-24 09:09:11 +00:00
parent 5dfb2c2d30
commit dfc3e94e28
2 changed files with 8 additions and 5 deletions

View File

@@ -17,7 +17,8 @@ class test_jwt extends PHPUnit_Framework_TestCase
public function test_sign_1 ()
{
$jwt = new jwt ();
$res = $jwt->sign ("TEXT TO SIGN", "KEY TO USE", "HS384");
$res = $this->invokeMethod ($jwt, "sign", "TEXT TO SIGN", "KEY TO USE",
"HS384");
$this->assertSame (
"cQB+yNVvIER+Nw53MZfU/PGPAJlkKUnjMikmXAwVB9tcaINQH5a88LCDi0PmI5mZ",
base64_encode ($res));
@@ -26,7 +27,8 @@ class test_jwt extends PHPUnit_Framework_TestCase
public function test_sign_2 ()
{
$jwt = new jwt ();
$res = $jwt->sign ("text to sign", "KEY TO USE", "HS384");
$res = $this->invokeMethod ($jwt, "sign", "text to sign", "KEY TO USE",
"HS384");
$this->assertSame (
"FLSkslsUGIpkP3xsJx5ephnCtH7K4jZSNxRxxCn3m7fsPK/MMfEIVr+h3heap80x",
base64_encode ($res));
@@ -35,7 +37,8 @@ class test_jwt extends PHPUnit_Framework_TestCase
public function test_sign_3 ()
{
$jwt = new jwt ();
$res = $jwt->sign ("text to sign", "key to use", "HS384");
$res = $this->invokeMethod ($jwt, "sign", "text to sign", "key to use",
"HS384");
$this->assertSame (
"lBLlXb5Xo3z9zoEuO0obZdhqGNUKr8DaEsL991TpSPWIdB2067ckR+AJ1FW6in2B",
base64_encode ($res));