added test for public user to create odt file inside public folder

This commit is contained in:
Prajwol Amatya
2024-09-18 09:11:31 +05:45
parent c77a0c50b0
commit 9815b70739
3 changed files with 143 additions and 4 deletions
@@ -64,4 +64,35 @@ class CollaborationHelper {
['Content-Type' => 'application/json']
);
}
/**
* @param string $baseUrl
* @param string $xRequestId
* @param string $user
* @param string $password
* @param string $parentContainerId
* @param string $file
* @param array|null $headers
*
* @return ResponseInterface
* @throws GuzzleException
*/
public static function createFile(
string $baseUrl,
string $xRequestId,
string $user,
string $password,
string $parentContainerId,
string $file,
?array $headers = null
): ResponseInterface {
$url = $baseUrl . "/app/new?parent_container_id=$parentContainerId&filename=$file";
return HttpRequestHelper::post(
$url,
$xRequestId,
$user,
$password,
$headers
);
}
}