File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,14 @@ protected function setUp(): void
3535 $ this ->db ->table ($ this ->tables ['identities ' ])->truncate ();
3636 }
3737
38+ protected function tearDown (): void
39+ {
40+ parent ::tearDown ();
41+
42+ // Reset the current time.
43+ Time::setTestNow ();
44+ }
45+
3846 public function testGenerateToken (): void
3947 {
4048 $ token = $ this ->user ->generateAccessToken ('foo ' );
@@ -213,8 +221,6 @@ public function testTokenTimeToExpired(): void
213221 $ this ->user ->setAccessToken ($ token );
214222
215223 $ this ->assertSame ('in 1 year ' , $ this ->user ->currentAccessToken ()->expires ->humanize ());
216-
217- Time::setTestNow ();
218224 }
219225
220226 /**
Original file line number Diff line number Diff line change @@ -35,6 +35,14 @@ protected function setUp(): void
3535 $ this ->db ->table ($ this ->tables ['identities ' ])->truncate ();
3636 }
3737
38+ protected function tearDown (): void
39+ {
40+ parent ::tearDown ();
41+
42+ // Reset the current time.
43+ Time::setTestNow ();
44+ }
45+
3846 public function testGenerateHmacToken (): void
3947 {
4048 $ token = $ this ->user ->generateHmacToken ('foo ' );
@@ -222,8 +230,6 @@ public function testHmacTokenTimeToExpired(): void
222230 $ token = $ this ->user ->generateHmacToken ('foo ' , ['foo.bar ' ], $ tokenExpiration );
223231
224232 $ this ->assertSame ('in 1 year ' , $ token ->expires ->humanize ());
225-
226- Time::setTestNow ();
227233 }
228234
229235 /**
You can’t perform that action at this time.
0 commit comments