@@ -48,7 +48,7 @@ public function testIssueToken()
48
48
$ this ->assertArrayHasKey ('access_token ' , $ json );
49
49
$ this ->assertArrayHasKey ('refresh_token ' , $ json );
50
50
$ this ->assertSame ('Bearer ' , $ json ['token_type ' ]);
51
- $ this ->assertSame (31536000 , $ json ['expires_in ' ]);
51
+ $ this ->assertEqualsWithDelta (31536000 , $ json ['expires_in ' ], 2 );
52
52
53
53
Route::get ('/foo ' , fn (Request $ request ) => $ request ->user ()->currentAccessToken ()->toJson ())
54
54
->middleware ('auth:api ' );
@@ -77,7 +77,7 @@ public function testIssueTokenWithAllScopes()
77
77
$ this ->assertArrayHasKey ('access_token ' , $ json );
78
78
$ this ->assertArrayHasKey ('refresh_token ' , $ json );
79
79
$ this ->assertSame ('Bearer ' , $ json ['token_type ' ]);
80
- $ this ->assertSame (31536000 , $ json ['expires_in ' ]);
80
+ $ this ->assertEqualsWithDelta (31536000 , $ json ['expires_in ' ], 2 );
81
81
82
82
Route::get ('/foo ' , fn (Request $ request ) => $ request ->user ()->currentAccessToken ()->toJson ())
83
83
->middleware ('auth:api ' );
@@ -167,7 +167,7 @@ public function testPublicClient()
167
167
$ this ->assertArrayHasKey ('access_token ' , $ json );
168
168
$ this ->assertArrayHasKey ('refresh_token ' , $ json );
169
169
$ this ->assertSame ('Bearer ' , $ json ['token_type ' ]);
170
- $ this ->assertSame (31536000 , $ json ['expires_in ' ]);
170
+ $ this ->assertEqualsWithDelta (31536000 , $ json ['expires_in ' ], 2 );
171
171
}
172
172
173
173
public function testUnauthorizedClient ()
0 commit comments