Skip to content

Commit

Permalink
Merge pull request #72 from LibreSign/chore/improve-error-message
Browse files Browse the repository at this point in the history
improve error message
  • Loading branch information
vitormattos authored Jul 2, 2024
2 parents a37af72 + c9e73b5 commit db27e54
Show file tree
Hide file tree
Showing 3 changed files with 294 additions and 440 deletions.
6 changes: 3 additions & 3 deletions src/NextcloudApiContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,11 +265,11 @@ private function jsonStringMatchWith(string $json, array $expectedValues): void
$this->validateAsJsonQuery($expected, $actual);
continue;
}
if ($this->isJson($actual)) {
Assert::assertJsonStringEqualsJsonString($value['value'], $actual, 'Key: ' . $value['key']);
if ($this->isJson($actual) && $this->isJson($value['value'])) {
Assert::assertJsonStringEqualsJsonString($value['value'], $actual, 'Key: ' . $value['key'] . ' JSON: ' . $json);
continue;
}
Assert::assertEquals($value['value'], $actual, 'Key: ' . $value['key']);
Assert::assertEquals($value['value'], $actual, 'Key: ' . $value['key'] . ' JSON: ' . $json);
}
}

Expand Down
Loading

0 comments on commit db27e54

Please sign in to comment.