public function testIsValid_true_customValidator() { $mutableJwt = new MutableJwt($this->claims, $this->secret, $this->header); $jwt = new Jwt($mutableJwt->encode(), $this->secret); $jwt->addValidator(function () { return true; }); $this->assertTrue($jwt->isValid()); }
public function testEncode() { $jwt = new Jwt($this->claims, $this->secret, $this->header); $this->assertEquals($this->srcJwt, $jwt->encode()); }