add tests for copy file within shares ucing file-id (#7593)

This commit is contained in:
Nalem7
2023-10-27 15:11:32 +05:45
committed by GitHub
parent 8eb7f7aa96
commit a15fe45d6a
3 changed files with 33 additions and 3 deletions
@@ -1965,8 +1965,15 @@ class SpacesContext implements Context {
} elseif ($actionType === 'renames') {
$fileDestination = $destinationFile;
}
$headers['Destination'] = $this->destinationHeaderValueWithSpaceName($user, $fileDestination, $toSpaceName, $url);
$fullUrl = $this->featureContext->getBaseUrl() . $url;
$baseUrl = $this->featureContext->getBaseUrl();
if ($toSpaceName === 'Shares') {
$sharesPath = $this->featureContext->getMountSharesPath($user, $fileDestination);
$davPath = WebDavHelper::getDavPath($user, $this->featureContext->getDavPathVersion());
$headers['Destination'] = $baseUrl . $davPath . $sharesPath;
} else {
$headers['Destination'] = $this->destinationHeaderValueWithSpaceName($user, $fileDestination, $toSpaceName, $url);
}
$fullUrl = $baseUrl . $url;
if ($actionType === 'copies') {
$this->featureContext->setResponse($this->copyFilesAndFoldersRequest($user, $fullUrl, $headers));
} elseif ($actionType === 'moves' || $actionType === 'renames') {