Skip to content

Commit

Permalink
chore: improve error message
Browse files Browse the repository at this point in the history
Signed-off-by: Vitor Mattos <[email protected]>
  • Loading branch information
vitormattos committed Jul 2, 2024
1 parent a37af72 commit e8104df
Showing 1 changed file with 3 additions and 3 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

0 comments on commit e8104df

Please sign in to comment.