Skip to content

Commit

Permalink
fix(oauth2): fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
  • Loading branch information
julien-nc committed Aug 30, 2024
1 parent 2b04419 commit cd765c2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function __construct(
) {
}

public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options): void {
$qbUpdate = $this->connection->getQueryBuilder();
$qbUpdate->update('oauth2_clients')
->set('secret', $qbUpdate->createParameter('updateSecret'))
Expand Down
10 changes: 5 additions & 5 deletions apps/oauth2/tests/Controller/OauthApiControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ public function testRefreshTokenInvalidClient($clientId, $clientSecret) {

$client = new Client();
$client->setClientIdentifier('clientId');
$client->setSecret('hashedClientSecret');
$client->setSecret(bin2hex('hashedClientSecret'));
$this->clientMapper->method('getByUid')
->with(42)
->willReturn($client);
Expand All @@ -287,7 +287,7 @@ public function testRefreshTokenInvalidAppToken() {

$client = new Client();
$client->setClientIdentifier('clientId');
$client->setSecret('hashedClientSecret');
$client->setSecret(bin2hex('hashedClientSecret'));
$this->clientMapper->method('getByUid')
->with(42)
->willReturn($client);
Expand Down Expand Up @@ -325,7 +325,7 @@ public function testRefreshTokenValidAppToken() {

$client = new Client();
$client->setClientIdentifier('clientId');
$client->setSecret('hashedClientSecret');
$client->setSecret(bin2hex('hashedClientSecret'));
$this->clientMapper->method('getByUid')
->with(42)
->willReturn($client);
Expand Down Expand Up @@ -421,7 +421,7 @@ public function testRefreshTokenValidAppTokenBasicAuth() {

$client = new Client();
$client->setClientIdentifier('clientId');
$client->setSecret('hashedClientSecret');
$client->setSecret(bin2hex('hashedClientSecret'));
$this->clientMapper->method('getByUid')
->with(42)
->willReturn($client);
Expand Down Expand Up @@ -520,7 +520,7 @@ public function testRefreshTokenExpiredAppToken() {

$client = new Client();
$client->setClientIdentifier('clientId');
$client->setSecret('hashedClientSecret');
$client->setSecret(bin2hex('hashedClientSecret'));
$this->clientMapper->method('getByUid')
->with(42)
->willReturn($client);
Expand Down

0 comments on commit cd765c2

Please sign in to comment.