Fix ldap tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
c81e79f8b9
commit
c6f6413bb1
|
@ -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…
Reference in New Issue