Skip to content

Commit

Permalink
Merge pull request #37437 from owncloud/tests-use-valid-depth
Browse files Browse the repository at this point in the history
[Tests-only] Use valid Depth values in tests
  • Loading branch information
Vincent Petry authored May 22, 2020
2 parents 1d6094c + ff79bb0 commit 702d4cb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions tests/TestHelpers/WebDavHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ public static function propfind(
}
$propertyBody .= "<$namespacePrefix:$property/>";
}
$folderDepth = (string) $folderDepth;
if ($folderDepth !== '0' && $folderDepth !== '1' && $folderDepth !== 'infinity') {
throw new InvalidArgumentException('Invalid depth value ' . $folderDepth);
}
$headers = ['Depth' => $folderDepth];
$body = "<?xml version=\"1.0\"?>
<d:propfind
Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance/features/bootstrap/TagsContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -1142,7 +1142,7 @@ private function requestTagsForFile($user, $fileName, $sharingUser = null) {
$this->featureContext->getBaseUrl(),
$user,
$this->featureContext->getPasswordForUser($user),
$fullPath, $properties, 'systemtags',
$fullPath, $properties, 1, 'systemtags',
$this->featureContext->getDavPathVersion('systemtags')
);
$this->featureContext->setResponse($response);
Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance/features/bootstrap/WebDav.php
Original file line number Diff line number Diff line change
Expand Up @@ -1416,7 +1416,7 @@ public function checkElementList(
$user, $elements, $expectedToBeListed = true
) {
$this->verifyTableNodeColumnsCount($elements, 1);
$responseXmlObject = $this->listFolder($user, "/", 5);
$responseXmlObject = $this->listFolder($user, "/", "infinity");
$elementRows = $elements->getRows();
$elementsSimplified = $this->simplifyArray($elementRows);
foreach ($elementsSimplified as $expectedElement) {
Expand Down

0 comments on commit 702d4cb

Please sign in to comment.