fex style

This commit is contained in:
Swikriti Tripathi
2023-01-05 12:58:17 +05:45
committed by Phil Davis
parent 7dbfcf63e0
commit d058278f44
2 changed files with 24 additions and 31 deletions
@@ -74,11 +74,6 @@ class SpacesContext implements Context {
*/
private FilesVersionsContext $filesVersionsContext;
/**
* @var ArchiverContext
*/
private ArchiverContext $archiverContext;
/**
* @var string
*/
@@ -463,7 +458,6 @@ class SpacesContext implements Context {
$this->favoritesContext = $environment->getContext('FavoritesContext');
$this->checksumContext = $environment->getContext('ChecksumContext');
$this->filesVersionsContext = $environment->getContext('FilesVersionsContext');
$this->archiverContext = $environment->getContext('ArchiverContext');
// Run the BeforeScenario function in OCSContext to set it up correctly
$this->ocsContext->before($scope);
$this->baseUrl = \trim($this->featureContext->getBaseUrl(), "/");
@@ -3096,28 +3090,27 @@ class SpacesContext implements Context {
}
}
/**
* @When /^public downloads the folder "([^"]*)" of space "([^"]*)" from the last created public link of "([^"]*)" using the resource id$/
* @param string $resource
* @param string $space
* @param string $owner
*
* @return void
* @throws GuzzleException
*/
public function publicDownloadsTheFolderFromTheLastCreatedPublicLink(string $resource, string $space, string $owner)
{
$token = $this->featureContext->getLastPublicShareToken();
$resourceId = $this->getFolderId($owner, $space, $resource);
$queryString = 'public-token='.$token.'&id='.$resourceId;
$this->featureContext->setResponse(
HttpRequestHelper::get(
$this->featureContext->getBaseUrl() . '/archiver?' . $queryString,
'',
'',
'',
)
);
}
/**
* @When /^public downloads the folder "([^"]*)" of space "([^"]*)" from the last created public link of "([^"]*)" using the resource id$/
*
* @param string $resource
* @param string $space
* @param string $owner
*
* @return void
* @throws GuzzleException
*/
public function publicDownloadsTheFolderFromTheLastCreatedPublicLink(string $resource, string $space, string $owner) {
$token = $this->featureContext->getLastPublicShareToken();
$resourceId = $this->getFolderId($owner, $space, $resource);
$queryString = 'public-token=' . $token . '&id=' . $resourceId;
$this->featureContext->setResponse(
HttpRequestHelper::get(
$this->featureContext->getBaseUrl() . '/archiver?' . $queryString,
'',
'',
'',
)
);
}
}