Skip to content

Commit

Permalink
add tests for update share invitation for root endpoint (#8906)
Browse files Browse the repository at this point in the history
  • Loading branch information
amrita-shrestha authored and DeepDiver1975 committed May 8, 2024
1 parent 0254a05 commit c2f0791
Show file tree
Hide file tree
Showing 4 changed files with 970 additions and 181 deletions.
34 changes: 34 additions & 0 deletions tests/TestHelpers/GraphHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -2144,4 +2144,38 @@ public static function sendSharingInvitationForDrive(
\json_encode($body)
);
}

/**
* @param string $baseUrl
* @param string $xRequestId
* @param string $user
* @param string $password
* @param string $spaceId
* @param mixed $body
* @param string $permissionsId
*
* @return ResponseInterface
* @throws GuzzleException
*/
public static function updateDriveShare(
string $baseUrl,
string $xRequestId,
string $user,
string $password,
string $spaceId,
$body,
string $permissionsId
): ResponseInterface {
$url = self::getBetaFullUrl($baseUrl, "drives/$spaceId/root/permissions/$permissionsId");

return HttpRequestHelper::sendRequestOnce(
$url,
$xRequestId,
'PATCH',
$user,
$password,
self::getRequestHeaders(),
$body
);
}
}

0 comments on commit c2f0791

Please sign in to comment.