mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-05 02:20:28 -05:00
[tests-only][full-ci]added test with step definition for mounting share when auto accept env set to false (#8623)
* added test with step definition for accepting pending share * addressing review
This commit is contained in:
@@ -1922,4 +1922,39 @@ class GraphHelper {
|
||||
self::getRequestHeaders()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $baseUrl
|
||||
* @param string $xRequestId
|
||||
* @param string $user
|
||||
* @param string $password
|
||||
* @param string $itemId
|
||||
* @param string $shareSpaceId
|
||||
*
|
||||
* @return ResponseInterface
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public static function mountShare(
|
||||
string $baseUrl,
|
||||
string $xRequestId,
|
||||
string $user,
|
||||
string $password,
|
||||
string $itemId,
|
||||
string $shareSpaceId
|
||||
): ResponseInterface {
|
||||
$body = [
|
||||
"remoteItem" => [
|
||||
"id" => $itemId
|
||||
]
|
||||
];
|
||||
$url = self::getBetaFullUrl($baseUrl, "drives/$shareSpaceId/root/children");
|
||||
return HttpRequestHelper::post(
|
||||
$url,
|
||||
$xRequestId,
|
||||
$user,
|
||||
$password,
|
||||
self::getRequestHeaders(),
|
||||
\json_encode($body)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user