@@ -44,7 +44,8 @@ public function testSuccessfulClientCredentialsRequest(): void
44
44
$ jsonResponse = json_decode ($ response ->getContent (), true );
45
45
46
46
$ this ->assertSame ('Bearer ' , $ jsonResponse ['token_type ' ]);
47
- $ this ->assertSame (3600 , $ jsonResponse ['expires_in ' ]);
47
+ $ this ->assertLessThanOrEqual (3600 , $ jsonResponse ['expires_in ' ]);
48
+ $ this ->assertGreaterThan (0 , $ jsonResponse ['expires_in ' ]);
48
49
$ this ->assertNotEmpty ($ jsonResponse ['access_token ' ]);
49
50
}
50
51
@@ -73,7 +74,8 @@ public function testSuccessfulPasswordRequest(): void
73
74
$ jsonResponse = json_decode ($ response ->getContent (), true );
74
75
75
76
$ this ->assertSame ('Bearer ' , $ jsonResponse ['token_type ' ]);
76
- $ this ->assertSame (3600 , $ jsonResponse ['expires_in ' ]);
77
+ $ this ->assertLessThanOrEqual (3600 , $ jsonResponse ['expires_in ' ]);
78
+ $ this ->assertGreaterThan (0 , $ jsonResponse ['expires_in ' ]);
77
79
$ this ->assertNotEmpty ($ jsonResponse ['access_token ' ]);
78
80
$ this ->assertNotEmpty ($ jsonResponse ['refresh_token ' ]);
79
81
}
@@ -100,7 +102,8 @@ public function testSuccessfulRefreshTokenRequest(): void
100
102
$ jsonResponse = json_decode ($ response ->getContent (), true );
101
103
102
104
$ this ->assertSame ('Bearer ' , $ jsonResponse ['token_type ' ]);
103
- $ this ->assertSame (3600 , $ jsonResponse ['expires_in ' ]);
105
+ $ this ->assertLessThanOrEqual (3600 , $ jsonResponse ['expires_in ' ]);
106
+ $ this ->assertGreaterThan (0 , $ jsonResponse ['expires_in ' ]);
104
107
$ this ->assertNotEmpty ($ jsonResponse ['access_token ' ]);
105
108
$ this ->assertNotEmpty ($ jsonResponse ['refresh_token ' ]);
106
109
}
@@ -128,7 +131,8 @@ public function testSuccessfulAuthorizationCodeRequest(): void
128
131
$ jsonResponse = json_decode ($ response ->getContent (), true );
129
132
130
133
$ this ->assertSame ('Bearer ' , $ jsonResponse ['token_type ' ]);
131
- $ this ->assertSame (3600 , $ jsonResponse ['expires_in ' ]);
134
+ $ this ->assertLessThanOrEqual (3600 , $ jsonResponse ['expires_in ' ]);
135
+ $ this ->assertGreaterThan (0 , $ jsonResponse ['expires_in ' ]);
132
136
$ this ->assertNotEmpty ($ jsonResponse ['access_token ' ]);
133
137
}
134
138
@@ -154,7 +158,8 @@ public function testSuccessfulAuthorizationCodeRequestWithPublicClient(): void
154
158
$ jsonResponse = json_decode ($ response ->getContent (), true );
155
159
156
160
$ this ->assertSame ('Bearer ' , $ jsonResponse ['token_type ' ]);
157
- $ this ->assertSame (3600 , $ jsonResponse ['expires_in ' ]);
161
+ $ this ->assertLessThanOrEqual (3600 , $ jsonResponse ['expires_in ' ]);
162
+ $ this ->assertGreaterThan (0 , $ jsonResponse ['expires_in ' ]);
158
163
$ this ->assertNotEmpty ($ jsonResponse ['access_token ' ]);
159
164
}
160
165
0 commit comments