public function testCreateWithInvalidAdapterName() { $this->setExpectedException(DriverNotFoundException::class); Ldap::create('foo'); }
/** * Construct an instance. * @staticvar int $instanceId * @param string $host The LDAP server host/ip * @param string $port The LDAP server port * @param string $dnString The distinguished name string containing '{username}' phrase, * which will be replaced with the username entered by user * @param integer $version The LDAP version (default = 3) */ public function __construct($host, $port, $dnString, $version = 3) { $this->ldapClient = Ldap::create('ext_ldap', array('host' => $host, 'port' => $port, 'version' => $version)); $this->dnString = $dnString; }