aboutsummaryrefslogtreecommitdiffstats
path: root/tests/Core/Command
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2024-08-06 14:43:44 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2024-08-06 14:43:44 +0200
commit1e2155993d0098b2c65388228e6bb9a692f0ac0c (patch)
tree8722260aba68493820e1511af37f7e0f021a69b4 /tests/Core/Command
parentbb94da69a611d0ff225a48244ad1b22b653dde1c (diff)
downloadnextcloud-server-1e2155993d0098b2c65388228e6bb9a692f0ac0c.tar.gz
nextcloud-server-1e2155993d0098b2c65388228e6bb9a692f0ac0c.zip
chore(tests): Adapt tests to the group:list change
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'tests/Core/Command')
-rw-r--r--tests/Core/Command/Group/ListCommandTest.php60
1 files changed, 32 insertions, 28 deletions
diff --git a/tests/Core/Command/Group/ListCommandTest.php b/tests/Core/Command/Group/ListCommandTest.php
index e4e91ce1458..73eb8866715 100644
--- a/tests/Core/Command/Group/ListCommandTest.php
+++ b/tests/Core/Command/Group/ListCommandTest.php
@@ -90,18 +90,20 @@ class ListCommandTest extends TestCase {
->with(
$this->equalTo($this->input),
$this->equalTo($this->output),
- [
- 'group1' => [
- 'user1',
- 'user2',
- ],
- 'group2' => [
- ],
- 'group3' => [
- 'user1',
- 'user3',
+ $this->callback(
+ fn ($iterator) => iterator_to_array($iterator) === [
+ 'group1' => [
+ 'user1',
+ 'user2',
+ ],
+ 'group2' => [
+ ],
+ 'group3' => [
+ 'user1',
+ 'user3',
+ ]
]
- ]
+ )
);
$this->invokePrivate($this->command, 'execute', [$this->input, $this->output]);
@@ -166,26 +168,28 @@ class ListCommandTest extends TestCase {
->with(
$this->equalTo($this->input),
$this->equalTo($this->output),
- [
- 'group1' => [
- 'backends' => ['Database'],
- 'users' => [
- 'user1',
- 'user2',
+ $this->callback(
+ fn ($iterator) => iterator_to_array($iterator) === [
+ 'group1' => [
+ 'backends' => ['Database'],
+ 'users' => [
+ 'user1',
+ 'user2',
+ ],
],
- ],
- 'group2' => [
- 'backends' => ['Database'],
- 'users' => [],
- ],
- 'group3' => [
- 'backends' => ['LDAP'],
- 'users' => [
- 'user1',
- 'user3',
+ 'group2' => [
+ 'backends' => ['Database'],
+ 'users' => [],
],
+ 'group3' => [
+ 'backends' => ['LDAP'],
+ 'users' => [
+ 'user1',
+ 'user3',
+ ],
+ ]
]
- ]
+ )
);
$this->invokePrivate($this->command, 'execute', [$this->input, $this->output]);