diff options
author | Morris Jobke <hey@morrisjobke.de> | 2014-11-24 18:13:01 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2014-11-24 18:13:01 +0100 |
commit | 02095d4f2052350132631970467c5aedd7cffe0c (patch) | |
tree | eea292d29f6681eadb2ed860a5a303b07dac048b /apps/user_ldap/tests/user_ldap.php | |
parent | 949d7b3312e51cb7076c6f51852cc7f04ea5ca58 (diff) | |
parent | 9aef83b5798733d718e03a4ef0edc7279db43e59 (diff) | |
download | nextcloud-server-02095d4f2052350132631970467c5aedd7cffe0c.tar.gz nextcloud-server-02095d4f2052350132631970467c5aedd7cffe0c.zip |
Merge pull request #11837 from owncloud/fix-11328
unify count filters and introduce display name attribute detection
Diffstat (limited to 'apps/user_ldap/tests/user_ldap.php')
-rw-r--r-- | apps/user_ldap/tests/user_ldap.php | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/apps/user_ldap/tests/user_ldap.php b/apps/user_ldap/tests/user_ldap.php index e91404d47f2..33cec0247b6 100644 --- a/apps/user_ldap/tests/user_ldap.php +++ b/apps/user_ldap/tests/user_ldap.php @@ -552,23 +552,9 @@ class Test_User_Ldap_Direct extends \Test\TestCase { public function testCountUsers() { $access = $this->getAccessMock(); - $access->connection->expects($this->once()) - ->method('__get') - ->will($this->returnCallback(function($name) { - if($name === 'ldapLoginFilter') { - return 'uid=%uid'; - } - return null; - })); - $access->expects($this->once()) ->method('countUsers') - ->will($this->returnCallback(function($filter, $a, $b, $c) { - if($filter !== 'uid=*') { - return false; - } - return 5; - })); + ->will($this->returnValue(5)); $backend = new UserLDAP($access); @@ -579,23 +565,9 @@ class Test_User_Ldap_Direct extends \Test\TestCase { public function testCountUsersFailing() { $access = $this->getAccessMock(); - $access->connection->expects($this->once()) - ->method('__get') - ->will($this->returnCallback(function($name) { - if($name === 'ldapLoginFilter') { - return 'invalidFilter'; - } - return null; - })); - $access->expects($this->once()) ->method('countUsers') - ->will($this->returnCallback(function($filter, $a, $b, $c) { - if($filter !== 'uid=*') { - return false; - } - return 5; - })); + ->will($this->returnValue(false)); $backend = new UserLDAP($access); |