23 lines
477 B
PHP
23 lines
477 B
PHP
<?php
|
|
|
|
namespace NoccyLabs\SimpleJWT;
|
|
|
|
|
|
class JWTUtilTest extends \PHPUnit\Framework\TestCase
|
|
{
|
|
|
|
/**
|
|
* @covers \NoccyLabs\SimpleJWT\JWTUtil::encode
|
|
* @covers \NoccyLabs\SimpleJWT\JWTUtil::decode
|
|
*/
|
|
public function testTheEncodingShouldBeSymmetric()
|
|
{
|
|
$v1a = "HelloWorld";
|
|
$v1b = JWTUtil::encode($v1a);
|
|
$v1c = JWTUtil::decode($v1b);
|
|
|
|
$this->assertEquals($v1a, $v1c);
|
|
$this->assertNotEquals($v1a, $v1b);
|
|
}
|
|
}
|