Skip to content

Commit

Permalink
Merge pull request #47083 from nextcloud/fix/group-list-test
Browse files Browse the repository at this point in the history
fix: Fix failing test for group listing
  • Loading branch information
AndyScherzinger authored Aug 6, 2024
2 parents a455283 + e4fa36e commit 70940d0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/Core/Command/Group/ListCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,13 @@ public function testExecute() {
public function testInfo() {
$group1 = $this->createMock(IGroup::class);
$group1->method('getGID')->willReturn('group1');
$group1->method('getDisplayName')->willReturn('Group 1');
$group2 = $this->createMock(IGroup::class);
$group2->method('getGID')->willReturn('group2');
$group2->method('getDisplayName')->willReturn('Group 2');
$group3 = $this->createMock(IGroup::class);
$group3->method('getGID')->willReturn('group3');
$group3->method('getDisplayName')->willReturn('Group 3');

$user = $this->createMock(IUser::class);

Expand Down Expand Up @@ -171,17 +174,20 @@ public function testInfo() {
$this->callback(
fn ($iterator) => iterator_to_array($iterator) === [
'group1' => [
'displayName' => 'Group 1',
'backends' => ['Database'],
'users' => [
'user1',
'user2',
],
],
'group2' => [
'displayName' => 'Group 2',
'backends' => ['Database'],
'users' => [],
],
'group3' => [
'displayName' => 'Group 3',
'backends' => ['LDAP'],
'users' => [
'user1',
Expand Down

0 comments on commit 70940d0

Please sign in to comment.