fix LDAP install for systems without ldap extension (#846)

This commit is contained in:
Kevin Papst
2019-06-11 01:25:49 +02:00
committed by GitHub
parent 0c0e9c2f71
commit 833968a87d
23 changed files with 82 additions and 326 deletions

View File

@@ -69,7 +69,6 @@ class ConfigurationTest extends TestCase
{
$config = $this->getMinConfig();
$config['ldap'] = [
'active' => true,
'connection' => [
'host' => 'foo'
],
@@ -78,22 +77,6 @@ class ConfigurationTest extends TestCase
$this->assertConfig($config, []);
}
/**
* @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
* @expectedExceptionMessage Invalid configuration for path "kimai.ldap": The "ldap.connection.host" config must be set if LDAP is activated.
*/
public function testValidateLdapConfigConnectionHost()
{
$config = $this->getMinConfig();
$config['ldap'] = [
'active' => true,
'connection' => [
],
];
$this->assertConfig($config, []);
}
/**
* @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
* @expectedExceptionMessage Invalid configuration for path "kimai.ldap.connection": The ldap.connection.useSsl and ldap.connection.useStartTls options are mutually exclusive.
@@ -102,7 +85,6 @@ class ConfigurationTest extends TestCase
{
$config = $this->getMinConfig();
$config['ldap'] = [
'active' => false,
'connection' => [
'useSsl' => true,
'useStartTls' => true,
@@ -120,7 +102,6 @@ class ConfigurationTest extends TestCase
{
$config = $this->getMinConfig();
$config['ldap'] = [
'active' => true,
'user' => [
'filter' => '(sdfsdfsdf)(uid=%s)',
],
@@ -137,7 +118,6 @@ class ConfigurationTest extends TestCase
{
$config = $this->getMinConfig();
$config['ldap'] = [
'active' => true,
'user' => [
'filter' => 's(dfsdfsdf)',
],
@@ -154,7 +134,6 @@ class ConfigurationTest extends TestCase
{
$config = $this->getMinConfig();
$config['ldap'] = [
'active' => true,
'user' => [
'filter' => '(dfsdfsdf))',
],
@@ -171,7 +150,6 @@ class ConfigurationTest extends TestCase
{
$config = $this->getMinConfig();
$config['ldap'] = [
'active' => false,
'connection' => [
'accountFilterFormat' => '(sdfsdfsdf)(uid=xx)',
],
@@ -188,7 +166,6 @@ class ConfigurationTest extends TestCase
{
$config = $this->getMinConfig();
$config['ldap'] = [
'active' => true,
'connection' => [
'accountFilterFormat' => 's(dfsdfsdf)',
],
@@ -205,7 +182,6 @@ class ConfigurationTest extends TestCase
{
$config = $this->getMinConfig();
$config['ldap'] = [
'active' => true,
'connection' => [
'accountFilterFormat' => '(dfsdfsdf))',
],
@@ -218,7 +194,6 @@ class ConfigurationTest extends TestCase
{
$finalizedConfig = $this->getCompiledConfig($this->getMinConfig());
$expected = [
'active' => false,
'user' => [
'baseDn' => '',
'filter' => '',