[full-ci][tests-only]Expand tests coverage related to user with different role (#5725)

* Refactor tests related to different role

* Use setResponse from When step
This commit is contained in:
Amrita
2023-03-21 10:03:51 +05:45
committed by GitHub
parent 7ed88edc57
commit 71011fc4aa
7 changed files with 291 additions and 52 deletions
+27
View File
@@ -285,6 +285,33 @@ class GraphHelper {
);
}
/**
* @param string $baseUrl
* @param string $xRequestId
* @param string $adminUser
* @param string $adminPassword
* @param string $userId
*
* @return ResponseInterface
* @throws GuzzleException
*/
public static function deleteUserByUserId(
string $baseUrl,
string $xRequestId,
string $adminUser,
string $adminPassword,
string $userId
): ResponseInterface {
$url = self::getFullUrl($baseUrl, 'users/' . $userId);
return HttpRequestHelper::delete(
$url,
$xRequestId,
$adminUser,
$adminPassword,
);
}
/**
* @param string $baseUrl
* @param string $xRequestId