[test-only] add test to filter or (#5771)

* add test to filter or

* lint
This commit is contained in:
Viktor Scharf
2023-03-10 09:05:00 +01:00
committed by GitHub
parent 8560015c18
commit 94c3df2246
3 changed files with 71 additions and 0 deletions
+29
View File
@@ -1151,6 +1151,35 @@ class GraphHelper {
);
}
/**
* @param string $baseUrl
* @param string $xRequestId
* @param string $user
* @param string $password
* @param string $firstGroup
* @param string $secondGroup
*
* @return ResponseInterface
* @throws GuzzleException
*/
public static function getUsersFromOneOrOtherGroup(
string $baseUrl,
string $xRequestId,
string $user,
string $password,
string $firstGroup,
string $secondGroup
): ResponseInterface {
$url = self::getFullUrl($baseUrl, 'users' . '?$filter=memberOf/any(m:m/id ' . "eq '$firstGroup') " . "or memberOf/any(m:m/id eq '$secondGroup')");
return HttpRequestHelper::get(
$url,
$xRequestId,
$user,
$password,
self::getRequestHeaders()
);
}
/**
* @param string $baseUrl
* @param string $xRequestId