Пример #1
0
 /**
  * @covers FR3D\LdapBundle\Ldap\LdapManager::bind
  */
 public function testBind()
 {
     $password = '******';
     $user = new TestUser();
     $this->driver->expects($this->once())->method('bind')->with($user, $this->equalTo($password))->will($this->returnValue(true));
     $this->assertTrue($this->ldapManager->bind($user, $password));
 }
Пример #2
0
 /**
  * @covers FR3D\LdapBundle\Ldap\LdapManager::bind
  */
 public function testBind()
 {
     $dn = 'dn=test_username';
     $password = '******';
     $user = new TestUser();
     $user->setDn($dn);
     $this->connection->expects($this->once())->method('bind')->with($this->equalTo($dn), $this->equalTo($password))->will($this->returnValue(true));
     $this->assertTrue($this->ldapManager->bind($user, $password));
 }