Ejemplo n.º 1
0
 public function testSlapdErrorFunctions()
 {
     $config = TestsHelper::getLdapConfig(214);
     $ldap = new SHLdap($config);
     $ldap->connect();
     $ldap->proxyBind();
     try {
         $ldap->read('cn=doesntexist,dc=shmanic,dc=net');
     } catch (Exception $e) {
         if ($code = $ldap->getErrorCode() === 32) {
             if (!$ldap->getErrorMsg() === SHLdap::errorToString($code)) {
                 $this->fail('Incorrect response message');
             }
         }
     }
 }