Add more tests coverage (#6854)

This commit is contained in:
Amrita
2023-07-25 12:27:42 +05:45
committed by amrita
parent 1138412aff
commit 6900a80511
6 changed files with 89 additions and 30 deletions
@@ -3318,18 +3318,20 @@ class SpacesContext implements Context {
}
/**
* @When user :user downloads the space :spaceName using the WebDAV API
* @When user :user tries to download the space :spaceName owned by user :owner using the WebDAV API
* @When /^user "([^"]*)" (?:downloads|tries to download) the space "([^"]*)" using the WebDAV API$/
*
* @param string $user
* @param string $spaceName
* @param string $owner
*
* @return void
*
* @throws GuzzleException
*/
public function userDownloadsTheSpaceUsingTheWebdavApi(string $user, string $spaceName):void {
$space = $this->getSpaceByName($user, $spaceName);
$url = $this->featureContext->getBaseUrl() . '/archiver?id=' . $space["id"];
public function userDownloadsTheSpaceUsingTheWebdavApi(string $user, string $spaceName, string $owner = ''):void {
$space = $this->getSpaceByName($owner ?: $user, $spaceName);
$url = $this->featureContext->getBaseUrl() . '/archiver?id=' . $space['id'];
$this->featureContext->setResponse(
HttpRequestHelper::get(
$url,