Example #1
0
 /**
  * @return void
  */
 public function testInvalidOptionResultsInException()
 {
     $optionName = 'invalid';
     try {
         $this->_ldap->setOptions(array($optionName => 'irrelevant'));
         $this->fail('Expected Zend_LDAP_Exception not thrown');
     } catch (LDAP\Exception $e) {
         $this->assertEquals("Unknown Zend_LDAP option: {$optionName}", $e->getMessage());
     }
 }
Example #2
0
 protected function _cleanupLDAPServer()
 {
     if (!constant('TESTS_ZEND_LDAP_ONLINE_ENABLED')) {
         return;
     }
     $ldap = $this->_ldap->getResource();
     foreach (array_reverse($this->_nodes) as $dn => $entry) {
         ldap_delete($ldap, $dn);
     }
 }