public function testFilteredSearch() { $ldap = new \Comodojo\Ldaph\Ldaph($this->ldap_server, $this->ldap_port); $data = $ldap->base($this->base)->searchbase($this->searchbase)->dn($this->dn)->version($this->ldap_verion)->ssl($this->use_ssl)->tls($this->use_tls)->account($this->auth_login, $this->auth_password)->fields($this->fields)->search("*", true); $this->assertInternalType('array', $data); foreach ($data as $result) { $this->assertInternalType('array', $result); $this->assertArrayNotHasKey("uid", $result); $this->assertArrayHasKey("cn", $result); $this->assertArrayHasKey("sn", $result); } }
public function testProperties() { $ldap = new \Comodojo\Ldaph\Ldaph($this->ldap_server, $this->ldap_port); $result = $ldap->dn($this->dn)->version($this->ldap_verion)->ssl($this->use_ssl)->tls($this->use_tls)->base($this->base)->searchbase($this->searchbase)->sso(false)->account($this->auth_login, $this->auth_password)->fields($this->fields); $this->assertInstanceOf('\\Comodojo\\Ldaph\\Ldaph', $result); }
public function testAuthentication() { $ldap = new \Comodojo\Ldaph\Ldaph($this->ldap_server, $this->ldap_port); $lauth = $ldap->dn($this->dn)->version($this->ldap_verion)->ssl($this->use_ssl)->tls($this->use_tls)->auth($this->auth_login, $this->auth_password); $this->assertTrue($lauth); }