|
@@ 54-67 (lines=14) @@
|
| 51 |
|
self::assertAlias('dol_ldap.ldap_driver.zend', 'dol_ldap.ldap_driver'); |
| 52 |
|
} |
| 53 |
|
|
| 54 |
|
public function testLoadFullConfiguration() |
| 55 |
|
{ |
| 56 |
|
$config = $this->getDefaultConfig(); |
| 57 |
|
$config['domains']['server1']['driver']['username'] = null; |
| 58 |
|
$config['domains']['server1']['driver']['password'] = null; |
| 59 |
|
$config['domains']['server1']['driver']['optReferrals'] = false; |
| 60 |
|
|
| 61 |
|
$this->container = new ContainerBuilder(); |
| 62 |
|
$extension = new DoLLdapExtension(); |
| 63 |
|
|
| 64 |
|
$extension->load([$config], $this->container); |
| 65 |
|
|
| 66 |
|
self::assertEquals($config['domains'], $this->container->getParameter('dol_ldap.domains.parameters')); |
| 67 |
|
} |
| 68 |
|
|
| 69 |
|
public function testLoadDriverConfiguration() |
| 70 |
|
{ |
|
@@ 84-97 (lines=14) @@
|
| 81 |
|
self::assertEquals($config['domains']['server1']['user'], $loadedConfig['server1']['user']); |
| 82 |
|
} |
| 83 |
|
|
| 84 |
|
public function testSslConfiguration() |
| 85 |
|
{ |
| 86 |
|
$config = $this->getDefaultConfig(); |
| 87 |
|
$config['domains']['server1']['driver']['useSsl'] = true; |
| 88 |
|
$config['domains']['server1']['driver']['useStartTls'] = false; |
| 89 |
|
|
| 90 |
|
$this->container = new ContainerBuilder(); |
| 91 |
|
$extension = new DoLLdapExtension(); |
| 92 |
|
|
| 93 |
|
$extension->load([$config], $this->container); |
| 94 |
|
|
| 95 |
|
$loadedConfig = $this->container->getParameter('dol_ldap.domains.parameters'); |
| 96 |
|
self::assertEquals($config['domains']['server1']['driver'], $loadedConfig['server1']['driver']); |
| 97 |
|
} |
| 98 |
|
|
| 99 |
|
public function testTlsConfiguration() |
| 100 |
|
{ |
|
@@ 99-112 (lines=14) @@
|
| 96 |
|
self::assertEquals($config['domains']['server1']['driver'], $loadedConfig['server1']['driver']); |
| 97 |
|
} |
| 98 |
|
|
| 99 |
|
public function testTlsConfiguration() |
| 100 |
|
{ |
| 101 |
|
$config = $this->getDefaultConfig(); |
| 102 |
|
$config['domains']['server1']['driver']['useSsl'] = false; |
| 103 |
|
$config['domains']['server1']['driver']['useStartTls'] = true; |
| 104 |
|
|
| 105 |
|
$this->container = new ContainerBuilder(); |
| 106 |
|
$extension = new DoLLdapExtension(); |
| 107 |
|
|
| 108 |
|
$extension->load([$config], $this->container); |
| 109 |
|
|
| 110 |
|
$loadedConfig = $this->container->getParameter('dol_ldap.domains.parameters'); |
| 111 |
|
self::assertEquals($config['domains']['server1']['driver'], $loadedConfig['server1']['driver']); |
| 112 |
|
} |
| 113 |
|
|
| 114 |
|
/** |
| 115 |
|
* @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException |