bind() public method

public bind ( $username, $password, $sasl = false )
Example #1
0
 /**
  * This tests that an exception is thrown
  * when trying to perform an LDAP method while
  * showing errors.
  */
 public function testConnectionShowErrors()
 {
     $ldap = new Ldap();
     $ldap->showErrors();
     $ldap->connect('test');
     try {
         $ldap->bind('test', 'test');
         $passes = false;
     } catch (\Exception $e) {
         $passes = true;
     }
     $this->assertTrue($passes);
 }