Skip to content

Commit

Permalink
workaround trashbin href difference on oCIS
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-davis committed Apr 30, 2022
1 parent 29d9796 commit e866295
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/acceptance/features/bootstrap/TrashbinContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,17 @@ public function listTrashbinFolderCollection(?string $user, ?string $collectionP
$files = \array_filter(
$files,
static function ($element) use ($user, $collectionPath) {
if (\trim($element['href'], "/") === "remote.php/dav/trash-bin") {
// This is a bug in oCIS. The root-level trashbin href should be like:
// /remote.php/dav/trash-bin/Alice/
// But it is missing the username, so is like:
// /remote.php/dav/trash-bin/
// We don't want to fail almost every trashbin test because of this.
// We filter out this entry here, and just echo a warning that this
// problem has happened, so that it can be seen in the test log output.
echo __METHOD__ . "Warning: unexpected href in trashbin propfind: " . $element['href'] . "\n";
return false;
}
$path = $collectionPath;
if ($path !== "") {
$path = $path . "/";
Expand Down

0 comments on commit e866295

Please sign in to comment.