[test-only] api tests for getting group info of user (#5476)

* add tests for geting group info

* more tests
This commit is contained in:
Viktor Scharf
2023-02-01 08:41:16 +01:00
committed by GitHub
parent e1a4ac6b33
commit 0bf121d2e2
4 changed files with 85 additions and 0 deletions
+26
View File
@@ -308,6 +308,32 @@ class GraphHelper {
);
}
/**
* @param string $baseUrl
* @param string $xRequestId
* @param string $byUser
* @param string $userPassword
* @param string|null $user
*
* @return ResponseInterface
* @throws GuzzleException
*/
public static function getUserWithGroupInformation(
string $baseUrl,
string $xRequestId,
string $byUser,
string $userPassword,
?string $user = null
): ResponseInterface {
$url = self::getFullUrl($baseUrl, 'users/' . $user . '?%24expand=memberOf');
return HttpRequestHelper::get(
$url,
$xRequestId,
$byUser,
$userPassword,
);
}
/**
* @param string $baseUrl
* @param string $xRequestId