From 4cd719c0c882adfe1f4245896202050174ada86f Mon Sep 17 00:00:00 2001 From: Tim van Dijen <tvdijen@gmail.com> Date: Fri, 22 Nov 2019 21:55:37 +0100 Subject: [PATCH] Fix namespace --- modules/core/config/routes/routes.yaml | 18 +++++++++--------- .../lib/Controller/LoginControllerTest.php | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/modules/core/config/routes/routes.yaml b/modules/core/config/routes/routes.yaml index 11bfa24cc..44913ee60 100644 --- a/modules/core/config/routes/routes.yaml +++ b/modules/core/config/routes/routes.yaml @@ -1,27 +1,27 @@ core-account: path: /account/{as} - defaults: { _controller: 'SimpleSAML\Module\core\Controller\LoginController:account' } + defaults: { _controller: 'SimpleSAML\Module\core\Controller\Login:account' } core-account-disco-clearchoices: path: /account/disco/clearchoices - defaults: { _controller: 'SimpleSAML\Module\core\Controller\LoginController:cleardiscochoices' } + defaults: { _controller: 'SimpleSAML\Module\core\Controller\Login:cleardiscochoices' } core-login: path: /login/{as} - defaults: { _controller: 'SimpleSAML\Module\core\Controller\LoginController:login', as: null } + defaults: { _controller: 'SimpleSAML\Module\core\Controller\Login:login', as: null } core-account: path: /account/{as} - defaults: { _controller: 'SimpleSAML\Module\core\Controller\LoginController:account' } + defaults: { _controller: 'SimpleSAML\Module\core\Controller\Login:account' } core-logout: path: /logout/{as} - defaults: { _controller: 'SimpleSAML\Module\core\Controller\LoginController:logout' } + defaults: { _controller: 'SimpleSAML\Module\core\Controller\Login:logout' } core-error-nocookie: path: /error/nocookie - defaults: { _controller: 'SimpleSAML\Module\core\Controller\ExceptionController:nocookie' } + defaults: { _controller: 'SimpleSAML\Module\core\Controller\Exception:nocookie' } core-cardinality: path: /error/cardinality - defaults: { _controller: 'SimpleSAML\Module\core\Controller\ExceptionController:cardinality' } + defaults: { _controller: 'SimpleSAML\Module\core\Controller\Exception:cardinality' } core-warning-shortssointerval: path: /warning/short_sso_interval - defaults: { _controller: 'SimpleSAML\Module\core\Controller\ExceptionController:shortSsoInterval' } + defaults: { _controller: 'SimpleSAML\Module\core\Controller\Exception:shortSsoInterval' } core-post-redirect: path: /postredirect - defaults: { _controller: 'SimpleSAML\Module\core\Controller\RedirectionController:postredirect' } + defaults: { _controller: 'SimpleSAML\Module\core\Controller\Redirection:postredirect' } diff --git a/tests/modules/core/lib/Controller/LoginControllerTest.php b/tests/modules/core/lib/Controller/LoginControllerTest.php index 4d4c989f2..d24f01925 100644 --- a/tests/modules/core/lib/Controller/LoginControllerTest.php +++ b/tests/modules/core/lib/Controller/LoginControllerTest.php @@ -8,7 +8,7 @@ use SimpleSAML\Configuration; use SimpleSAML\Error\Exception; use SimpleSAML\HTTP\RunnableResponse; use SimpleSAML\Locale\Localization; -use SimpleSAML\Module\core\Controller\LoginController; +use SimpleSAML\Module\core\Controller; use SimpleSAML\Session; use SimpleSAML\Test\Utils\ClearStateTestCase; use SimpleSAML\XHTML\Template; @@ -23,7 +23,7 @@ use Symfony\Component\HttpFoundation\Request; * * @package SimpleSAML\Test */ -class LoginControllerTest extends ClearStateTestCase +class LoginTest extends ClearStateTestCase { /** @var array */ protected $authSources; @@ -79,7 +79,7 @@ class LoginControllerTest extends ClearStateTestCase $session = Session::getSessionFromRequest(); $factory = new AuthenticationFactory($this->config, $session); - $c = new LoginController($this->config, $session, $factory); + $c = new Controller/Login($this->config, $session, $factory); /** @var \SimpleSAML\HTTP\RunnableResponse $response */ $response = $c->login($request); @@ -118,7 +118,7 @@ class LoginControllerTest extends ClearStateTestCase $session = Session::getSessionFromRequest(); $factory = new AuthenticationFactory($this->config, $session); - $c = new LoginController($this->config, $session, $factory); + $c = new Controller/Login($this->config, $session, $factory); /** @var \SimpleSAML\XHTML\Template $response */ $response = $c->login($request); @@ -141,7 +141,7 @@ class LoginControllerTest extends ClearStateTestCase $request = new Request(); $session = Session::getSessionFromRequest(); $factory = new AuthenticationFactory($this->config, $session); - $c = new LoginController($this->config, $session, $factory); + $c = new Controller/Login($this->config, $session, $factory); $this->expectException(Exception::class); $c->login($request, 'invalid-auth-source'); } @@ -176,7 +176,7 @@ class LoginControllerTest extends ClearStateTestCase $factory = new AuthenticationFactory($this->config, $session); $request = new Request(); - $c = new LoginController($this->config, $session, $factory); + $c = new Controller/Login($this->config, $session, $factory); /** @var \Symfony\Component\HttpFoundation\RedirectResponse $response */ $response = $c->login($request); $this->assertInstanceOf(RedirectResponse::class, $response); @@ -197,7 +197,7 @@ class LoginControllerTest extends ClearStateTestCase Configuration::setPreLoadedConfig($asConfig, 'authsources.php'); $session = Session::getSessionFromRequest(); $factory = new AuthenticationFactory($this->config, $session); - $c = new LoginController($this->config, $session, $factory); + $c = new Controller/Login($this->config, $session, $factory); $response = $c->logout('example-userpass'); $this->assertInstanceOf(RunnableResponse::class, $response); list($object, $method) = $response->getCallable(); @@ -218,7 +218,7 @@ class LoginControllerTest extends ClearStateTestCase Configuration::setPreLoadedConfig($asConfig, 'authsources.php'); $session = Session::getSessionFromRequest(); $factory = new AuthenticationFactory($this->config, $session); - $c = new LoginController($this->config, $session, $factory); + $c = new Controller/Login($this->config, $session, $factory); /** @var RedirectResponse $response */ $response = $c->account('example-userpass'); $this->assertInstanceOf(RedirectResponse::class, $response); @@ -251,7 +251,7 @@ class LoginControllerTest extends ClearStateTestCase ] ]); $factory = new AuthenticationFactory($this->config, $session); - $c = new LoginController($this->config, $session, $factory); + $c = new Controller/Login($this->config, $session, $factory); /** @var \SimpleSAML\XHTML\Template $response */ $response = $c->account('example-userpass'); $this->assertInstanceOf(Template::class, $response); -- GitLab