예제 #1
0
파일: ConnectTest.php 프로젝트: stunti/zf2
 public function testDisconnect()
 {
     $ldap = new LDAP\LDAP($this->_options);
     for ($i = 0; $i < 3; $i++) {
         $ldap->disconnect();
         try {
             $ldap->connect()->bind('CN=ignored,DC=example,DC=com', 'ignored');
             $this->fail('Expected exception for unknown username');
         } catch (LDAP\Exception $zle) {
             $this->assertContains('Invalid credentials', $zle->getMessage());
         }
     }
 }