Skip to content

Commit

Permalink
add tests for update share invitation for root endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
amrita-shrestha committed May 3, 2024
1 parent 9354300 commit 72f39ad
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
Expand Up @@ -2111,4 +2111,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 updateShareOfDrive(
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 72f39ad

Please sign in to comment.