diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2015-04-09 12:00:11 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2015-04-09 12:00:11 +0200 |
commit | 40edaa5a690e9094beb6e19bb8a11ff754976f82 (patch) | |
tree | 6d0a69424bc5696a3e2e564d6f0a2846aacb6ecf /apps/user_ldap/tests | |
parent | 5355c285fc5dfce3daf945fa6d5080f6c381d1ee (diff) | |
download | nextcloud-server-40edaa5a690e9094beb6e19bb8a11ff754976f82.tar.gz nextcloud-server-40edaa5a690e9094beb6e19bb8a11ff754976f82.zip |
adjust tests
Diffstat (limited to 'apps/user_ldap/tests')
-rw-r--r-- | apps/user_ldap/tests/user_ldap.php | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/apps/user_ldap/tests/user_ldap.php b/apps/user_ldap/tests/user_ldap.php index fa3afe9c511..b9beed1d35a 100644 --- a/apps/user_ldap/tests/user_ldap.php +++ b/apps/user_ldap/tests/user_ldap.php @@ -108,12 +108,6 @@ class Test_User_Ldap_Direct extends \Test\TestCase { * @return void */ private function prepareAccessForCheckPassword(&$access, $noDisplayName = false) { - $access->expects($this->once()) - ->method('escapeFilterPart') - ->will($this->returnCallback(function($uid) { - return $uid; - })); - $access->connection->expects($this->any()) ->method('__get') ->will($this->returnCallback(function($name) { @@ -132,6 +126,15 @@ class Test_User_Ldap_Direct extends \Test\TestCase { return array(); })); + $access->expects($this->any()) + ->method('fetchUsersByLoginName') + ->will($this->returnCallback(function($uid) { + if($uid === 'roland') { + return array(array('dn' => 'dnOfRoland,dc=test')); + } + return array(); + })); + $retVal = 'gunslinger'; if($noDisplayName === true) { $retVal = false; |