Skip to content

Commit 3e31fe9

Browse files
committed
Update tests
1 parent 96b76ef commit 3e31fe9

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

tests/Exception/OAuthServerExceptionTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,4 +137,11 @@ public function testCanGetRedirectionUri()
137137

138138
$this->assertSame('https://example.com/error', $exceptionWithRedirect->getRedirectUri());
139139
}
140+
141+
public function testInvalidCredentialsIsInvalidGrant()
142+
{
143+
$exception = OAuthServerException::invalidCredentials();
144+
145+
$this->assertSame('invalid_grant', $exception->getErrorType());
146+
}
140147
}

tests/Grant/PasswordGrantTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ public function testRespondToRequestBadCredentials()
211211
$responseType = new StubResponseType();
212212

213213
$this->expectException(\League\OAuth2\Server\Exception\OAuthServerException::class);
214-
$this->expectExceptionCode(10);
214+
$this->expectExceptionCode(6);
215215

216216
$grant->respondToAccessTokenRequest($serverRequest, $responseType, new DateInterval('PT5M'));
217217
}

0 commit comments

Comments
 (0)