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

@@ -54,13 +54,14 @@ class SamlProviderTest extends TestCase
}
$systemConfig = new SystemConfiguration(new TestConfigLoader([]), ['saml' => ['activate' => true]]);
$samlConfig = new SamlConfiguration($systemConfig);
$repository = $this->getMockBuilder(UserRepository::class)->disableOriginalConstructor()->getMock();
if ($user !== null) {
$repository->expects($this->once())->method('loadUserByUsername')->willReturn($user);
}
$userProvider = new ChainUserProvider([new DoctrineUserProvider($repository)]);
$provider = new SamlProvider($repository, $userProvider, new SamlTokenFactory(), $userFactory, $systemConfig);
$provider = new SamlProvider($repository, $userProvider, new SamlTokenFactory(), $userFactory, $samlConfig);
return $provider;
}