Skip to content

Commit

Permalink
Fix groups aliases property to be an array of strings, not Alias objects
Browse files Browse the repository at this point in the history
  • Loading branch information
mtompset committed Dec 11, 2024
1 parent 085200a commit 5dc4c6d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions SilMock/Google/Service/Directory/Resource/Groups.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ public function get(string $groupKey): ?GoogleDirectory_Group
}
if ($matchedGroup !== null) {
$mockGroupsAliasesObject = new GroupsAliases($this->dbFile);
$aliases = $mockGroupsAliasesObject->listGroupsAliases($matchedGroup->getEmail());
$matchedGroup->setAliases($aliases->getAliases());
$aliasesObject = $mockGroupsAliasesObject->listGroupsAliases($matchedGroup->getEmail());
$arrayOfAliasOjbects = $aliasesObject->getAliases();
$aliases = array_map(function (GoogleDirectory_GroupAlias $alias) { return $alias->getAlias(); }, $arrayOfAliasOjbects);
$matchedGroup->setAliases($aliases);
}
return $matchedGroup;
}
Expand Down

0 comments on commit 5dc4c6d

Please sign in to comment.