Skip to content

Commit 38b1b89

Browse files
committed
fix: Improve schema testing a bit by providing a readable message with a reference to the failed schema
1 parent 281e3fc commit 38b1b89

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

modules/thunder_gqls/tests/src/Traits/ThunderGqlsTestTrait.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ protected function runAndTestQuery(string $schema): void {
2929

3030
$expectedData = $this->jsonDecode($this->getExpectedResponseFromFile($schema))['data'];
3131

32-
$this->assertEqualsCanonicalizing($expectedData, $responseData);
32+
$this->assertEqualsCanonicalizing(
33+
$expectedData,
34+
$responseData,
35+
'The expected schema for "' . $schema . '" did not match the result.'
36+
);
3337
}
3438

3539
/**

0 commit comments

Comments
 (0)