public function testConnectAndPrivilegedBind()
{
// This connect is supposed to fail.
- $lcfg = array('host' => 'nonexistant.ldap.horde.org');
+ $lcfg = array('hostspec' => 'nonexistant.ldap.horde.org');
try {
$ldap = new Horde_Ldap($lcfg);
$this->fail('Horde_Ldap_Exception expected.');
} catch (Horde_Ldap_Exception $e) {}
// Failing with multiple hosts.
- $lcfg = array('host' => array('nonexistant1.ldap.horde.org',
- 'nonexistant2.ldap.horde.org'));
+ $lcfg = array('hostspec' => array('nonexistant1.ldap.horde.org',
+ 'nonexistant2.ldap.horde.org'));
try {
$ldap = new Horde_Ldap($lcfg);
$this->fail('Horde_Ldap_Exception expected.');
} catch (Horde_Ldap_Exception $e) {}
- // Simple working connect and privilegued bind.
+ // Simple working connect and privileged bind.
$ldap = new Horde_Ldap(self::$ldapcfg['server']);
// Working connect and privileged bind with first host down.
- $lcfg = array('host' => array('nonexistant.ldap.horde.org',
- self::$ldapcfg['server']['host']),
- 'port' => self::$ldapcfg['server']['port'],
- 'binddn' => self::$ldapcfg['server']['binddn'],
- 'bindpw' => self::$ldapcfg['server']['bindpw']);
+ $lcfg = array('hostspec' => array('nonexistant.ldap.horde.org',
+ self::$ldapcfg['server']['hostspec']),
+ 'port' => self::$ldapcfg['server']['port'],
+ 'writedn' => self::$ldapcfg['server']['writedn'],
+ 'writepw' => self::$ldapcfg['server']['writepw']);
$ldap = new Horde_Ldap($lcfg);
}
}
// Simple working connect and anonymous bind.
- $lcfg = array('host' => self::$ldapcfg['server']['host'],
- 'port' => self::$ldapcfg['server']['port']);
+ $lcfg = array('hostspec' => self::$ldapcfg['server']['hostspec'],
+ 'port' => self::$ldapcfg['server']['port']);
$ldap = new Horde_Ldap($lcfg);
}
<?php
$conf = array(
'server' => array(
- 'host' => 'localhost',
- 'port' => 389,
- 'basedn' => 'ou=hordetest,dc=example,dc=com',
- 'writedn' => 'cn=admin,dc=example,dc=com',
- 'writepw' => 'secret'),
+ 'hostspec' => 'localhost',
+ 'port' => 389,
+ 'basedn' => 'ou=hordetest,dc=example,dc=com',
+ 'writedn' => 'cn=admin,dc=example,dc=com',
+ 'writepw' => 'secret'),
'capability' => array(
'anonymous' => true,
'tls' => true),