mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-01 00:10:17 -05:00
[tests-only] Extend API test coverage for MOVE between spaces using file-id (#8126)
* add issue tags * extend API test coverage for MOVE between spaces using file-id * fix table header * re-arrange scenarios * update expected failure * update expected failure
This commit is contained in:
@@ -1980,16 +1980,19 @@ class SpacesContext implements Context {
|
||||
*/
|
||||
public function userCopiesOrMovesFileWithFileIdFromAndToSpaceBetweenSpaces(string $user, string $actionType, string $sourceFile, string $destinationFile, string $toSpaceName, string $url): void {
|
||||
// split the source when there are sub-folders
|
||||
$sourceFile = explode("/", $sourceFile);
|
||||
$sourceFile = \trim($sourceFile, "/");
|
||||
$sourceFile = \explode("/", $sourceFile);
|
||||
$sourceFile = \end($sourceFile);
|
||||
$destinationFile = \trim($destinationFile, "/");
|
||||
$fileDestination = '';
|
||||
if ($actionType === 'copies' || $actionType === 'moves') {
|
||||
$fileDestination = $this->escapePath(\ltrim($destinationFile, "/")) . '/' . $this->escapePath(\ltrim(end($sourceFile), "/"));
|
||||
$fileDestination = $this->escapePath($destinationFile) . '/' . $this->escapePath($sourceFile);
|
||||
} elseif ($actionType === 'renames') {
|
||||
$fileDestination = $destinationFile;
|
||||
}
|
||||
$baseUrl = $this->featureContext->getBaseUrl();
|
||||
if ($toSpaceName === 'Shares') {
|
||||
$sharesPath = $this->featureContext->getMountSharesPath($user, $fileDestination);
|
||||
$sharesPath = $this->featureContext->getSharesMountPath($user, $fileDestination);
|
||||
$davPath = WebDavHelper::getDavPath($user, $this->featureContext->getDavPathVersion());
|
||||
$headers['Destination'] = $baseUrl . $davPath . $sharesPath;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user