add tests to check versions of file in a space shared via link

Signed-off-by: prashant-gurung899 <prasantgrg777@gmail.com>
This commit is contained in:
prashant-gurung899
2024-09-05 11:33:04 +05:45
parent e224264d9e
commit 809b7a4373
2 changed files with 57 additions and 0 deletions

View File

@@ -72,6 +72,32 @@ class FilesVersionsContext implements Context {
$this->featureContext->setResponse($this->getFileVersions($user, $file));
}
/**
* @When the public tries to get the number of versions of file :file with password :password using file-id path :endpoint
*
* @param string $file
* @param string $password
* @param string $endpoint
*
* @return void
*/
public function thePublicGetsTheNumberOfVersionsOfFileWithPasswordUsingFileIdPath(string $file, string $password, string $endpoint): void {
$password = $this->featureContext->getActualPassword($password);
$this->featureContext->setResponse(
$this->featureContext->makeDavRequest(
"public",
"PROPFIND",
$endpoint,
null,
null,
"versions",
(string)$this->featureContext->getDavPathVersion(),
false,
$password
)
);
}
/**
* @param string $user
* @param string $file