diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2020-06-24 23:34:37 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2020-06-24 23:34:37 +0200 |
commit | b8bef4ded07f1b7197437f9914ace4d2763e1b9f (patch) | |
tree | 161789f9af3affb5ace9e366f80c8c5deb59c2fe /apps/user_ldap/tests/Jobs | |
parent | 7d4682da4008300c01f5745b438811032317e4c1 (diff) | |
download | nextcloud-server-b8bef4ded07f1b7197437f9914ace4d2763e1b9f.tar.gz nextcloud-server-b8bef4ded07f1b7197437f9914ace4d2763e1b9f.zip |
fix strings being passed where arrays where expected
also brought type hints up to internal API level
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/user_ldap/tests/Jobs')
-rw-r--r-- | apps/user_ldap/tests/Jobs/SyncTest.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/user_ldap/tests/Jobs/SyncTest.php b/apps/user_ldap/tests/Jobs/SyncTest.php index 5f2adbe7dd1..0971e31ae85 100644 --- a/apps/user_ldap/tests/Jobs/SyncTest.php +++ b/apps/user_ldap/tests/Jobs/SyncTest.php @@ -189,9 +189,16 @@ class SyncTest extends TestCase { ->with($connection) ->willReturn($access); + $this->userManager->expects($this->any()) + ->method('getAttributes') + ->willReturn(['dn', 'uid', 'mail', 'displayname']); + $access->expects($this->once()) ->method('fetchListOfUsers') ->willReturn(array_pad([], $results, 'someUser')); + $access->expects($this->any()) + ->method('combineFilterWithAnd') + ->willReturn('pseudo=filter'); $access->connection = $connection; $access->userManager = $this->userManager; @@ -356,9 +363,16 @@ class SyncTest extends TestCase { ->with($connection) ->willReturn($access); + $this->userManager->expects($this->any()) + ->method('getAttributes') + ->willReturn(['dn', 'uid', 'mail', 'displayname']); + $access->expects($this->once()) ->method('fetchListOfUsers') ->willReturn(array_pad([], $runData['usersThisCycle'], 'someUser')); + $access->expects($this->any()) + ->method('combineFilterWithAnd') + ->willReturn('pseudo=filter'); $access->connection = $connection; $access->userManager = $this->userManager; |