Exemplo n.º 1
0
 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);
     }
 }
Exemplo n.º 2
0
 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);
 }
Exemplo n.º 3
0
 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);
 }