Fixed case in test filenames

This commit is contained in:
2023-04-10 00:55:15 +02:00
parent c5dd773026
commit b0566e3148
5 changed files with 0 additions and 0 deletions

50
tests/JWTTokenTest.php Normal file
View File

@ -0,0 +1,50 @@
<?php
namespace NoccyLabs\SimpleJWT;
use NoccyLabs\SimpleJWT\Key\JWTPlaintextKey;
class JWTTokenTest extends \PHPUnit\Framework\TestCase
{
/**
* @covers NoccyLabs\SimpleJWT\JWTToken
* @covers NoccyLabs\SimpleJWT\Key\JWTPlaintextKey
* @covers NoccyLabs\SimpleJWT\Collection\PropertyBag
* @covers NoccyLabs\SimpleJWT\JWTUtil
*/
public function testGeneratingTokens()
{
$key = new JWTPlaintextKey("test");
$tok = new JWTToken($key);
$tok->addClaim("foo", true);
$token = $tok->getSignedToken();
$this->assertNotNull($token);
$this->assertTrue($tok->isGenerated());
}
/**
* @covers NoccyLabs\SimpleJWT\JWTToken
* @covers NoccyLabs\SimpleJWT\Key\JWTPlaintextKey
* @covers NoccyLabs\SimpleJWT\Collection\PropertyBag
* @covers NoccyLabs\SimpleJWT\JWTUtil
*/
public function testParsingTokens()
{
$key = new JWTPlaintextKey("test");
$tok = new JWTToken($key);
$tok->addClaim("foo", true);
$token = $tok->getSignedToken();
$parsed = new JWTToken($key, $token);
$this->assertTrue($parsed->isValid());
$this->assertFalse($parsed->isGenerated());
}
}