diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2014-10-27 23:39:30 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2014-11-20 18:31:39 +0100 |
commit | f725cc66a385311d9995ec4215f57448b59f124e (patch) | |
tree | abd35b868ec32fe783823f0a02021a9760a0e1a3 /apps/user_ldap/tests | |
parent | cb3af1dce294ab058162b3c4d1a0feb84465dd0b (diff) | |
download | nextcloud-server-f725cc66a385311d9995ec4215f57448b59f124e.tar.gz nextcloud-server-f725cc66a385311d9995ec4215f57448b59f124e.zip |
consolidate user count filter in wizard and user back end
Diffstat (limited to 'apps/user_ldap/tests')
-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 c89edc33fa9..d975fd56c51 100644 --- a/apps/user_ldap/tests/user_ldap.php +++ b/apps/user_ldap/tests/user_ldap.php @@ -550,23 +550,9 @@ class Test_User_Ldap_Direct extends \PHPUnit_Framework_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); @@ -577,23 +563,9 @@ class Test_User_Ldap_Direct extends \PHPUnit_Framework_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); |