Adjust test method tryToDeleteFileFromTrashbin

This commit is contained in:
Phil Davis
2023-05-30 15:03:54 +05:45
parent 80b4e85747
commit 0bc3d8646e

View File

@@ -586,7 +586,10 @@ class TrashbinContext implements Context {
$numItemsDeleted = 0;
foreach ($listing as $entry) {
if ($entry['original-location'] === $originalPath) {
// The entry for the trashbin root can have original-location null.
// That is reasonable, because the trashbin root is not something that can be restored.
$originalLocation = $entry['original-location'] ?? '';
if (\trim($originalLocation, '/') === $originalPath) {
$trashItemHRef = $this->convertTrashbinHref($entry['href']);
$response = $this->featureContext->makeDavRequest(
$asUser,