added tests for reading content of a file by fileId using WebDav API (#6958)

This commit is contained in:
Prajwol Amatya
2023-08-18 09:58:25 +05:45
committed by GitHub
parent 809c64f823
commit 84bc7d88e2
4 changed files with 123 additions and 6 deletions
@@ -1160,7 +1160,7 @@ class SpacesContext implements Context {
* @param string $content
* @param string $destination
*
* @return void
* @return string[]
* @throws GuzzleException
* @throws Exception
*/
@@ -1169,9 +1169,9 @@ class SpacesContext implements Context {
string $spaceName,
string $content,
string $destination
): void {
): array {
$this->setSpaceIDByName($user, $spaceName);
$this->featureContext->uploadFileWithContent($user, $content, $destination);
return $this->featureContext->uploadFileWithContent($user, $content, $destination);
}
/**
@@ -1785,7 +1785,7 @@ class SpacesContext implements Context {
* @param string $fileContent
* @param string $destination
*
* @return void
* @return string[]
* @throws GuzzleException
*/
public function userHasUploadedFile(
@@ -1793,10 +1793,11 @@ class SpacesContext implements Context {
string $spaceName,
string $fileContent,
string $destination
): void {
): array {
$this->theUserListsAllHisAvailableSpacesUsingTheGraphApi($user);
$this->theUserUploadsAFileToSpace($user, $spaceName, $fileContent, $destination);
$fileId = $this->theUserUploadsAFileToSpace($user, $spaceName, $fileContent, $destination);
$this->featureContext->theHTTPStatusCodeShouldBeOr(201, 204);
return $fileId;
}
/**