Skip to content

Commit

Permalink
debug(tests): Debug the trashbin test
Browse files Browse the repository at this point in the history
Signed-off-by: Joas Schilling <coding@schilljs.com>
  • Loading branch information
nickvergessen committed May 10, 2023
1 parent 1801824 commit 062f198
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/Integration/features/bootstrap/WebDav.php
Original file line number Diff line number Diff line change
Expand Up @@ -946,6 +946,28 @@ public function userDeletesEverythingInFolder($user, $folder) {
}
}

/**
* @Then /^User "([^"]*)" sees no files in the trashbin$/
* @param string $user
*/
public function userSeesNoFilesInTheTrashbin($user) {
$client = $this->getSabreClient($user);
$properties = [
'{DAV:}getetag'
];

$response = $client->propfind($this->makeSabrePath($user, 'trash', 'trashbin'), $properties, 1);

// Remove the root entry to only have the directory listing
unset($response['/remote.php/dav/trashbin/' . $user . '/trash/']);

$count = count($response);
if ($count !== 0) {
var_dump($response);
}

Assert::assertEquals(0, $count);
}

/**
* @param string $user
Expand Down

0 comments on commit 062f198

Please sign in to comment.