Skip to content
Snippets Groups Projects
Unverified Commit c6f6413b authored by Roeland Jago Douma's avatar Roeland Jago Douma
Browse files

Fix ldap tests

parent c81e79f8
No related branches found
No related tags found
No related merge requests found
...@@ -1269,6 +1269,7 @@ class UserTest extends \Test\TestCase { ...@@ -1269,6 +1269,7 @@ class UserTest extends \Test\TestCase {
return array( return array(
array( array(
'pwdchangedtime' => array((new \DateTime())->sub(new \DateInterval('P28D'))->format('Ymdhis').'Z'), 'pwdchangedtime' => array((new \DateTime())->sub(new \DateInterval('P28D'))->format('Ymdhis').'Z'),
'pwdgraceusetime' => [],
), ),
); );
} }
...@@ -1342,6 +1343,7 @@ class UserTest extends \Test\TestCase { ...@@ -1342,6 +1343,7 @@ class UserTest extends \Test\TestCase {
array( array(
'pwdpolicysubentry' => array('cn=custom,ou=policies,dc=foo,dc=bar'), 'pwdpolicysubentry' => array('cn=custom,ou=policies,dc=foo,dc=bar'),
'pwdchangedtime' => array((new \DateTime())->sub(new \DateInterval('P28D'))->format('Ymdhis').'Z'), 'pwdchangedtime' => array((new \DateTime())->sub(new \DateInterval('P28D'))->format('Ymdhis').'Z'),
'pwdgraceusetime' => [],
) )
); );
} }
......
...@@ -135,6 +135,9 @@ class User_LDAPTest extends TestCase { ...@@ -135,6 +135,9 @@ class User_LDAPTest extends TestCase {
return false; return false;
} }
})); }));
$access->method('fetchUsersByLoginName')
->willReturn([]);
} }
/** /**
...@@ -353,6 +356,9 @@ class User_LDAPTest extends TestCase { ...@@ -353,6 +356,9 @@ class User_LDAPTest extends TestCase {
$access->expects($this->any()) $access->expects($this->any())
->method('nextcloudUserNames') ->method('nextcloudUserNames')
->will($this->returnArgument(0)); ->will($this->returnArgument(0));
$access->method('fetchUsersByLoginName')
->willReturn([]);
} }
public function testGetUsersNoParam() { public function testGetUsersNoParam() {
...@@ -760,6 +766,9 @@ class User_LDAPTest extends TestCase { ...@@ -760,6 +766,9 @@ class User_LDAPTest extends TestCase {
$access->expects($this->any()) $access->expects($this->any())
->method('getUserMapper') ->method('getUserMapper')
->will($this->returnValue($userMapper)); ->will($this->returnValue($userMapper));
$access->method('fetchUsersByLoginName')
->willReturn([]);
} }
public function testGetDisplayName() { public function testGetDisplayName() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment