From 4f7322891b8c1272ffc54c400c0de3dee2d59250 Mon Sep 17 00:00:00 2001 From: Steve Breker Date: Fri, 4 Oct 2024 12:33:42 -0700 Subject: [PATCH] Add fixes to ArOidcTest --- test/phpunit/arOidcPlugin/lib/ArOidcTest.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/phpunit/arOidcPlugin/lib/ArOidcTest.php b/test/phpunit/arOidcPlugin/lib/ArOidcTest.php index 21bd57f969..e66846dbb3 100644 --- a/test/phpunit/arOidcPlugin/lib/ArOidcTest.php +++ b/test/phpunit/arOidcPlugin/lib/ArOidcTest.php @@ -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 @@ -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.', ], ]; @@ -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', ], ];