summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2017-08-09 16:43:40 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2017-08-09 21:10:15 +0200
commitc6f6413bb195f043e6054bc8b38dedcf1bfdf6cc (patch)
tree251257a05962eeebf645a2ed3e141ce9b4af5c9e /apps/user_ldap
parentc81e79f8b9c5ddd6dd40b4ecdc43ad3c18810dc9 (diff)
downloadnextcloud-server-c6f6413bb195f043e6054bc8b38dedcf1bfdf6cc.tar.gz
nextcloud-server-c6f6413bb195f043e6054bc8b38dedcf1bfdf6cc.zip
Fix ldap tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/user_ldap')
-rw-r--r--apps/user_ldap/tests/User/UserTest.php2
-rw-r--r--apps/user_ldap/tests/User_LDAPTest.php9
2 files changed, 11 insertions, 0 deletions
diff --git a/apps/user_ldap/tests/User/UserTest.php b/apps/user_ldap/tests/User/UserTest.php
index 0437051b134..f48abc9ce4a 100644
--- a/apps/user_ldap/tests/User/UserTest.php
+++ b/apps/user_ldap/tests/User/UserTest.php
@@ -1269,6 +1269,7 @@ class UserTest extends \Test\TestCase {
return array(
array(
'pwdchangedtime' => array((new \DateTime())->sub(new \DateInterval('P28D'))->format('Ymdhis').'Z'),
+ 'pwdgraceusetime' => [],
),
);
}
@@ -1342,6 +1343,7 @@ class UserTest extends \Test\TestCase {
array(
'pwdpolicysubentry' => array('cn=custom,ou=policies,dc=foo,dc=bar'),
'pwdchangedtime' => array((new \DateTime())->sub(new \DateInterval('P28D'))->format('Ymdhis').'Z'),
+ 'pwdgraceusetime' => [],
)
);
}
diff --git a/apps/user_ldap/tests/User_LDAPTest.php b/apps/user_ldap/tests/User_LDAPTest.php
index aaf67ebcab6..ced5009148d 100644
--- a/apps/user_ldap/tests/User_LDAPTest.php
+++ b/apps/user_ldap/tests/User_LDAPTest.php
@@ -135,6 +135,9 @@ class User_LDAPTest extends TestCase {
return false;
}
}));
+
+ $access->method('fetchUsersByLoginName')
+ ->willReturn([]);
}
/**
@@ -353,6 +356,9 @@ class User_LDAPTest extends TestCase {
$access->expects($this->any())
->method('nextcloudUserNames')
->will($this->returnArgument(0));
+
+ $access->method('fetchUsersByLoginName')
+ ->willReturn([]);
}
public function testGetUsersNoParam() {
@@ -760,6 +766,9 @@ class User_LDAPTest extends TestCase {
$access->expects($this->any())
->method('getUserMapper')
->will($this->returnValue($userMapper));
+
+ $access->method('fetchUsersByLoginName')
+ ->willReturn([]);
}
public function testGetDisplayName() {