示例#1
0
 /**
  * @dataProvider displayNameProvider
  */
 public function testComposeAndStoreDisplayName($part1, $part2, $expected)
 {
     list($access, $config, $filesys, $image, $log, $avaMgr, , $userMgr) = $this->getTestInstances();
     $config->expects($this->once())->method('setUserValue');
     $user = new User('user', 'cn=user', $access, $config, $filesys, $image, $log, $avaMgr, $userMgr);
     $displayName = $user->composeAndStoreDisplayName($part1, $part2);
     $this->assertSame($expected, $displayName);
 }
示例#2
0
 /**
  * check if a user exists on LDAP
  * @param string|\OCA\User_LDAP\User\User $user either the ownCloud user
  * name or an instance of that user
  * @return boolean
  */
 public function userExistsOnLDAP($user)
 {
     $id = $user instanceof User ? $user->getUsername() : $user;
     return $this->handleRequest($id, 'userExistsOnLDAP', array($user));
 }