diff --git a/modules/saml/routing/routes/routes.yaml b/modules/saml/routing/routes/routes.yaml index 4b61e1755e735445726e0d51849df74766b1a511..cafab094df621b41eb0cadeb4d0651dedf8d3661 100644 --- a/modules/saml/routing/routes/routes.yaml +++ b/modules/saml/routing/routes/routes.yaml @@ -32,7 +32,7 @@ websso-single-sign-on: path: /idp/singleSignOnService defaults: { _controller: 'SimpleSAML\Module\saml\Controller\WebBrowserSingleSignOn::singleSignOnService' } websso-artifact-resolution: - path: //idp/artifactResolutionService + path: /idp/artifactResolutionService defaults: { _controller: 'SimpleSAML\Module\saml\Controller\WebBrowserSingleSignOn::artifactResolutionService' } websso-metadata: path: /idp/metadata diff --git a/tests/modules/saml/lib/Controller/MetadataTest.php b/tests/modules/saml/lib/Controller/MetadataTest.php index 78c8da7b6bfb396e38f65ff879184d906eadf723..f507c9e55dc1172fd53d9f7cc63d1a48e5ba9a41 100644 --- a/tests/modules/saml/lib/Controller/MetadataTest.php +++ b/tests/modules/saml/lib/Controller/MetadataTest.php @@ -10,7 +10,7 @@ use SimpleSAML\HTTP\RunnableResponse; use SimpleSAML\Module\saml\Controller; use SimpleSAML\Session; use SimpleSAML\Utils; -//use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; /** @@ -84,14 +84,19 @@ class MetadataTest extends TestCase */ public function testMetadataAccess(bool $authenticated, bool $protected): void { - $c = new Controller\ServiceProvider($this->config, $this->session); + $request = Request::create( + '/idp/metadata', + 'GET', + ); + + $c = new Controller\Metadata($this->config, $this->session); if ($authenticated === true || $protected === false) { // Bypass authentication - mock being authenticated $c->setAuthUtils($this->authUtils); } - $result = $c->metadata('phpunit'); + $result = $c->metadata($request); if ($authenticated !== false && $protected !== true) { // ($authenticated === true) or ($protected === false)