Fix ldap tests

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
pull/5791/head
Roeland Jago Douma 9 years ago
parent c81e79f8b9
commit c6f6413bb1
No known key found for this signature in database
GPG Key ID: F941078878347C0C
  1. 2
      apps/user_ldap/tests/User/UserTest.php
  2. 9
      apps/user_ldap/tests/User_LDAPTest.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' => [],
)
);
}

@ -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() {

Loading…
Cancel
Save