Skip to content

Commit bc717a5

Browse files
authored
Merge pull request #3076 from KKSzymanowski/assert-json-correction
Correct the note regarding assertJson
2 parents 7f632e3 + 323b60b commit bc717a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

http-tests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Laravel also provides several helpers for testing JSON APIs and their responses.
9898
}
9999
}
100100

101-
> {tip} The `assertJson` method converts the given array into JSON, and then verifies that the JSON fragment occurs **anywhere** within the entire JSON response returned by the application. So, if there are other properties in the JSON response, this test will still pass as long as the given fragment is present.
101+
> {tip} The `assertJson` method converts the response to an array and utilizes `PHPUnit::assertArraySubset` to verify that the given fragment exists within the JSON response returned by the application. So, if there are other properties in the JSON response, this test will still pass as long as the given fragment is present.
102102
103103
<a name="verifying-exact-match"></a>
104104
### Verifying Exact Match

0 commit comments

Comments
 (0)