Skip to content

Commit 31f45a0

Browse files
committed
Fix transient test
1 parent f4850ad commit 31f45a0

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

Tests/Integration/AuthorizationServerTest.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ public function testValidClientCredentialsGrant(): void
175175

176176
// Response assertions.
177177
$this->assertSame('Bearer', $response['token_type']);
178-
$this->assertSame(3600, $response['expires_in']);
178+
$this->assertLessThanOrEqual(3600, $response['expires_in']);
179179
$this->assertInstanceOf(AccessToken::class, $accessToken);
180180

181181
// Make sure the access token is issued for the given client ID.
@@ -195,7 +195,7 @@ public function testValidClientCredentialsGrantWithScope(): void
195195

196196
// Response assertions.
197197
$this->assertSame('Bearer', $response['token_type']);
198-
$this->assertSame(3600, $response['expires_in']);
198+
$this->assertLessThanOrEqual(3600, $response['expires_in']);
199199
$this->assertInstanceOf(AccessToken::class, $accessToken);
200200

201201
// Make sure the access token is issued for the given client ID.
@@ -221,7 +221,7 @@ public function testValidClientCredentialsGrantWithInheritedScope(): void
221221

222222
// Response assertions.
223223
$this->assertSame('Bearer', $response['token_type']);
224-
$this->assertSame(3600, $response['expires_in']);
224+
$this->assertLessThanOrEqual(3600, $response['expires_in']);
225225
$this->assertInstanceOf(AccessToken::class, $accessToken);
226226

227227
// Make sure the access token is issued for the given client ID.
@@ -248,7 +248,7 @@ public function testValidClientCredentialsGrantWithRequestedScope(): void
248248

249249
// Response assertions.
250250
$this->assertSame('Bearer', $response['token_type']);
251-
$this->assertSame(3600, $response['expires_in']);
251+
$this->assertLessThanOrEqual(3600, $response['expires_in']);
252252
$this->assertInstanceOf(AccessToken::class, $accessToken);
253253

254254
// Make sure the access token is issued for the given client ID.
@@ -281,7 +281,7 @@ public function testValidPasswordGrant(): void
281281

282282
// Response assertions.
283283
$this->assertSame('Bearer', $response['token_type']);
284-
$this->assertSame(3600, $response['expires_in']);
284+
$this->assertLessThanOrEqual(3600, $response['expires_in']);
285285
$this->assertInstanceOf(AccessToken::class, $accessToken);
286286
$this->assertInstanceOf(RefreshToken::class, $refreshToken);
287287

@@ -357,7 +357,7 @@ public function testValidRefreshGrant(): void
357357

358358
// Response assertions.
359359
$this->assertSame('Bearer', $response['token_type']);
360-
$this->assertSame(3600, $response['expires_in']);
360+
$this->assertLessThanOrEqual(3600, $response['expires_in']);
361361
$this->assertInstanceOf(AccessToken::class, $accessToken);
362362
$this->assertInstanceOf(RefreshToken::class, $refreshToken);
363363

@@ -640,7 +640,7 @@ public function testSuccessfulAuthorizationWithCode(): void
640640
$accessToken = $this->getAccessToken($response['access_token']);
641641

642642
$this->assertSame('Bearer', $response['token_type']);
643-
$this->assertSame(3600, $response['expires_in']);
643+
$this->assertLessThanOrEqual(3600, $response['expires_in']);
644644
$this->assertInstanceOf(AccessToken::class, $accessToken);
645645
$this->assertSame('foo', $accessToken->getClient()->getIdentifier());
646646
}
@@ -713,7 +713,7 @@ public function testSuccessfulImplicitRequest(): void
713713

714714
// Response assertions.
715715
$this->assertSame('Bearer', $responseData['token_type']);
716-
$this->assertEquals(600, $responseData['expires_in']);
716+
$this->assertLessThanOrEqual(600, $responseData['expires_in']);
717717
$this->assertInstanceOf(AccessToken::class, $accessToken);
718718
$this->assertSame('foo', $accessToken->getClient()->getIdentifier());
719719
}
@@ -735,7 +735,7 @@ public function testSuccessfulImplicitRequestWithState(): void
735735

736736
// Response assertions.
737737
$this->assertSame('Bearer', $responseData['token_type']);
738-
$this->assertEquals(600, $responseData['expires_in']);
738+
$this->assertLessThanOrEqual(600, $responseData['expires_in']);
739739
$this->assertInstanceOf(AccessToken::class, $accessToken);
740740
$this->assertSame('foo', $accessToken->getClient()->getIdentifier());
741741
$this->assertSame('quzbaz', $responseData['state']);
@@ -757,7 +757,7 @@ public function testSuccessfulImplicitRequestRedirectUri(): void
757757

758758
// Response assertions.
759759
$this->assertSame('Bearer', $responseData['token_type']);
760-
$this->assertEquals(600, $responseData['expires_in']);
760+
$this->assertLessThanOrEqual(600, $responseData['expires_in']);
761761
$this->assertInstanceOf(AccessToken::class, $accessToken);
762762
$this->assertSame('foo', $accessToken->getClient()->getIdentifier());
763763
}

0 commit comments

Comments
 (0)