Skip to content

Commit

Permalink
Add fixes to ArOidcTest
Browse files Browse the repository at this point in the history
  • Loading branch information
sbreker committed Oct 4, 2024
1 parent 98503aa commit 4f73228
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/phpunit/arOidcPlugin/lib/ArOidcTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use Jumbojett\OpenIDConnectClient;
use PHPUnit\Framework\TestCase;

require_once 'plugins/arOidcPlugin/config/arOidcPluginConfiguration.class.php';
require_once 'plugins/arOidcPlugin/lib/arOidc.class.php';

/**
* @internal
Expand Down Expand Up @@ -47,7 +47,7 @@ public function getOidcInstanceExceptionProvider(): array
return [
'OIDC set empty redirect URL' => [
'redirectUrl' => '',
'expectedException' => '\Exception',
'expectedException' => 'Error',
'expectedExceptionMessage' => 'Invalid OIDC redirect URL. Please review the app_oidc_redirect_url parameter in plugin app.yml.',
],
];
Expand Down Expand Up @@ -102,22 +102,22 @@ public function validateScopesExceptionProvider()
return [
'OIDC validate scopes when scopes array is empty' => [
'scopes' => [],
'expectedException' => '\Exception',
'expectedException' => 'Error',
'expectedExceptionMessage' => 'Invalid OIDC scopes. The app_oidc_scopes array is empty in the plugin app.yml.',
],
'OIDC validate scopes when scopes has empty elements' => [
'scopes' => [' ', ''],
'expectedException' => '\Exception',
'expectedException' => 'Error',
'expectedExceptionMessage' => 'Invalid scope value found in app_oidc_scopes',
],
'OIDC validate scopes when scopes has some empty elements' => [
'scopes' => ['one', ''],
'expectedException' => '\Exception',
'expectedException' => 'Error',
'expectedExceptionMessage' => 'Invalid scope value found in app_oidc_scopes',
],
'OIDC validate scopes when scopes has some empty elements' => [
'scopes' => [' ', 'two '],
'expectedException' => '\Exception',
'expectedException' => 'Error',
'expectedExceptionMessage' => 'Invalid scope value found in app_oidc_scopes',
],
];
Expand Down

0 comments on commit 4f73228

Please sign in to comment.