/** * @test * * @covers Lcobucci\JWT\Token::isExpired * * @uses Lcobucci\JWT\Token::__construct * @uses Lcobucci\JWT\Token::getClaim * @uses Lcobucci\JWT\Token::hasClaim * @uses Lcobucci\JWT\Claim\Basic * @uses Lcobucci\JWT\Claim\GreaterOrEqualsTo */ public function isExpiredShouldReturnTrueAfterTokenExpires() { $token = new Token(['alg' => 'none'], ['exp' => new GreaterOrEqualsTo('exp', time())]); $this->assertTrue($token->isExpired(new DateTime('+10 days'))); }