@@ -48,7 +48,7 @@ public function testIssueToken()
4848 $ this ->assertArrayHasKey ('access_token ' , $ json );
4949 $ this ->assertArrayHasKey ('refresh_token ' , $ json );
5050 $ this ->assertSame ('Bearer ' , $ json ['token_type ' ]);
51- $ this ->assertSame (31536000 , $ json ['expires_in ' ]);
51+ $ this ->assertEqualsWithDelta (31536000 , $ json ['expires_in ' ], 2 );
5252
5353 Route::get ('/foo ' , fn (Request $ request ) => $ request ->user ()->currentAccessToken ()->toJson ())
5454 ->middleware ('auth:api ' );
@@ -77,7 +77,7 @@ public function testIssueTokenWithAllScopes()
7777 $ this ->assertArrayHasKey ('access_token ' , $ json );
7878 $ this ->assertArrayHasKey ('refresh_token ' , $ json );
7979 $ this ->assertSame ('Bearer ' , $ json ['token_type ' ]);
80- $ this ->assertSame (31536000 , $ json ['expires_in ' ]);
80+ $ this ->assertEqualsWithDelta (31536000 , $ json ['expires_in ' ], 2 );
8181
8282 Route::get ('/foo ' , fn (Request $ request ) => $ request ->user ()->currentAccessToken ()->toJson ())
8383 ->middleware ('auth:api ' );
@@ -167,7 +167,7 @@ public function testPublicClient()
167167 $ this ->assertArrayHasKey ('access_token ' , $ json );
168168 $ this ->assertArrayHasKey ('refresh_token ' , $ json );
169169 $ this ->assertSame ('Bearer ' , $ json ['token_type ' ]);
170- $ this ->assertSame (31536000 , $ json ['expires_in ' ]);
170+ $ this ->assertEqualsWithDelta (31536000 , $ json ['expires_in ' ], 2 );
171171 }
172172
173173 public function testUnauthorizedClient ()
0 commit comments