Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
chore(tests): Adapt tests to the group:list change
Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc committed Aug 6, 2024
commit 1e2155993d0098b2c65388228e6bb9a692f0ac0c
60 changes: 32 additions & 28 deletions tests/Core/Command/Group/ListCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,20 @@ public function testExecute() {
->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]);
Expand Down Expand Up @@ -166,26 +168,28 @@ public function testInfo() {
->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]);
Expand Down