Skip to content

Commit

Permalink
Merge pull request #37844 from owncloud/improve-error-handling-getArr…
Browse files Browse the repository at this point in the history
…ayOfShareesResponded

[Tests-Only] Improve error reporting when getArrayOfShareesResponded response has missing data
  • Loading branch information
phil-davis authored Aug 25, 2020
2 parents 5804220 + 117b79b commit d65b8b5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions tests/acceptance/features/bootstrap/ShareesContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,12 @@ public function getArrayOfShareesResponded(
$shareeType = \substr($shareeType, 6);
}

Assert::assertArrayHasKey(
$shareeType,
$elements,
__METHOD__ . " The sharees response does not have key '$shareeType'"
);

$sharees = [];
foreach ($elements[$shareeType] as $element) {
if (\is_int(\key($element))) {
Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance/features/bootstrap/TrashbinContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ public function asFileOrFolderExistsInTrash($user, $path) {

Assert::assertNotNull(
$firstEntry,
"The first trash entry is found null unexpectedly"
"The first trash entry was not found while looking for trashbin entry '$path' of user '$user'"
);

if (\count($sections) !== 1) {
Expand Down

0 comments on commit d65b8b5

Please sign in to comment.