Fix ldap tests

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2017-08-09 16:43:40 +02:00
parent c81e79f8b9
commit c6f6413bb1
No known key found for this signature in database
GPG Key ID: F941078878347C0C
2 changed files with 11 additions and 0 deletions

View File

@ -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' => [],
)
);
}

View File

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