validateToken($token); $this->assertEquals(true, $valid); } public function testExpiredKeysShouldFailWithException() { $key = new JwtPlaintextKey("key"); $token = new JwtToken($key); $token->header->set("exp", 0); $token = new JwtToken($key, $token->getSignedToken()); $validator = new JwtValidator(); $this->expectException(JwtTokenException::class); $valid = $validator->validateToken($token); } }