| Conditions | 1 |
| Paths | 1 |
| Total Lines | 31 |
| Code Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public function testLdapConfiguration() |
||
| 15 | { |
||
| 16 | $authSourceData = [ |
||
| 17 | 'hostname' => 'ldaps://ldap.example.com:636', |
||
| 18 | 'debug' => false, |
||
| 19 | ]; |
||
| 20 | |||
| 21 | $confTest = new TestCase\AuthSource\Ldap\Configuration( |
||
| 22 | new TestData([ |
||
| 23 | 'authSourceData' => ApplicationConfiguration::loadFromArray($authSourceData), |
||
| 24 | ]) |
||
| 25 | ); |
||
| 26 | |||
| 27 | $testResult = $confTest->getTestResult(); |
||
| 28 | $this->assertEquals('ldaps://ldap.example.com:636', $testResult->getSubject()); |
||
| 29 | |||
| 30 | $authSourceData = [ |
||
| 31 | 'hostname' => 'ldap.example.com', |
||
| 32 | 'port' => 636, |
||
| 33 | 'enable_tls' => true, |
||
| 34 | 'timeout' => 999, |
||
| 35 | 'debug' => false, |
||
| 36 | 'referrals' => true, |
||
| 37 | ]; |
||
| 38 | |||
| 39 | $confTest = new TestCase\AuthSource\Ldap\Configuration( |
||
| 40 | new TestData(['authSourceData' => ApplicationConfiguration::loadFromArray($authSourceData)]) |
||
| 41 | ); |
||
| 42 | |||
| 43 | $testResult = $confTest->getTestResult(); |
||
| 44 | $this->assertEquals('ldap.example.com:636', $testResult->getSubject()); |
||
| 45 | } |
||
| 47 |