From 5dc4c6d7bfc0ab7451b210ace7480e9e9e6274eb Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Wed, 11 Dec 2024 12:45:05 -0500 Subject: [PATCH] Fix groups aliases property to be an array of strings, not Alias objects --- SilMock/Google/Service/Directory/Resource/Groups.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/SilMock/Google/Service/Directory/Resource/Groups.php b/SilMock/Google/Service/Directory/Resource/Groups.php index b97b549..6bb2f6b 100644 --- a/SilMock/Google/Service/Directory/Resource/Groups.php +++ b/SilMock/Google/Service/Directory/Resource/Groups.php @@ -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; }