use saml config interface instead of generic system configuration (#3551)

This commit is contained in:
Kevin Papst
2022-09-23 13:29:46 +02:00
committed by GitHub
parent b38fc96623
commit bfab6f42d0
8 changed files with 41 additions and 28 deletions

View File

@@ -9,8 +9,11 @@
namespace App\Tests\Controller\Security;
use App\Configuration\SamlConfiguration;
use App\Configuration\SystemConfiguration;
use App\Controller\Security\SecurityController;
use App\Entity\User;
use App\Tests\Configuration\TestConfigLoader;
use App\Tests\Controller\ControllerBaseTest;
use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface;
@@ -119,7 +122,9 @@ class SecurityControllerTest extends ControllerBaseTest
$client = self::createClient(); // just to bootstrap the container
$csrf = $this->createMock(CsrfTokenManagerInterface::class);
$sut = new SecurityController($csrf);
$systemConfig = new SystemConfiguration(new TestConfigLoader([]), ['saml' => ['activate' => true]]);
$samlConfig = new SamlConfiguration($systemConfig);
$sut = new SecurityController($csrf, $samlConfig);
$sut->checkAction();
}
@@ -130,7 +135,9 @@ class SecurityControllerTest extends ControllerBaseTest
$client = self::createClient(); // just to bootstrap the container
$csrf = $this->createMock(CsrfTokenManagerInterface::class);
$sut = new SecurityController($csrf);
$systemConfig = new SystemConfiguration(new TestConfigLoader([]), ['saml' => ['activate' => true]]);
$samlConfig = new SamlConfiguration($systemConfig);
$sut = new SecurityController($csrf, $samlConfig);
$sut->logoutAction();
}
}