Skip to content

Commit 3849f9c

Browse files
committed
test: reset current time
1 parent c12fbf0 commit 3849f9c

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

tests/Authentication/HasAccessTokensTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,8 @@ public function testTokenTimeToExpired(): void
213213
$this->user->setAccessToken($token);
214214

215215
$this->assertSame('in 1 year', $this->user->currentAccessToken()->expires->humanize());
216+
217+
Time::setTestNow();
216218
}
217219

218220
/**

tests/Authentication/HasHmacTokensTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,8 @@ public function testHmacTokenTimeToExpired(): void
222222
$token = $this->user->generateHmacToken('foo', ['foo.bar'], $tokenExpiration);
223223

224224
$this->assertSame('in 1 year', $token->expires->humanize());
225+
226+
Time::setTestNow();
225227
}
226228

227229
/**

0 commit comments

Comments
 (0)