addClaim("foo", true); $token = $tok->getSignedToken(); $this->assertNotNull($token); $this->assertTrue($tok->isGenerated()); } 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()); } }