Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hafezdivandari committed Nov 19, 2024
1 parent 44bb1bd commit 4998c4a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions tests/Grant/AuthCodeGrantTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1745,6 +1745,7 @@ public function testRespondToAccessTokenRequestNoEncryptionKey(): void
[
'grant_type' => 'authorization_code',
'client_id' => 'foo',
'client_secret' => 'bar',
'redirect_uri' => self::REDIRECT_URI,
'code' => 'badCode',
]
Expand Down
6 changes: 3 additions & 3 deletions tests/Grant/DeviceCodeGrantTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ public function testDeviceAuthorizationResponse(): void
$server->setDefaultScope(self::DEFAULT_SCOPE);

$serverRequest = (new ServerRequest())->withParsedBody([
'client_id' => 'foo',
'client_id' => 'foo',
]);

$deviceCodeGrant = new DeviceCodeGrant(
Expand Down Expand Up @@ -698,8 +698,8 @@ public function testIssueAccessDeniedError(): void
$grant->completeDeviceAuthorizationRequest($deviceCode->getIdentifier(), '1', false);

$serverRequest = (new ServerRequest())->withParsedBody([
'client_id' => 'foo',
'device_code' => $deviceCode->getIdentifier(),
'client_id' => 'foo',
'device_code' => $deviceCode->getIdentifier(),
]);

$responseType = new StubResponseType();
Expand Down
4 changes: 3 additions & 1 deletion tests/Grant/RefreshTokenGrantTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,9 @@ public function testRespondToRequestWithIntUserId(): void
$scopeRepositoryMock->method('finalizeScopes')->willReturn([$scopeEntity]);

$accessTokenRepositoryMock = $this->getMockBuilder(AccessTokenRepositoryInterface::class)->getMock();
$accessTokenRepositoryMock->method('getNewToken')->willReturn(new AccessTokenEntity());
$accessTokenEntity = new AccessTokenEntity();
$accessTokenEntity->setClient($client);
$accessTokenRepositoryMock->method('getNewToken')->willReturn($accessTokenEntity);
$accessTokenRepositoryMock->expects(self::once())->method('persistNewAccessToken')->willReturnSelf();

$refreshTokenRepositoryMock = $this->getMockBuilder(RefreshTokenRepositoryInterface::class)->getMock();
Expand Down

0 comments on commit 4998c4a

Please sign in to comment.