Add documentation for assertion

This commit is contained in:
Marcus Moore
2026-05-13 11:27:26 -07:00
parent b4bb1556be
commit 339c93ebbf
+16
View File
@@ -190,6 +190,22 @@ trait CustomTestMacros
}
);
/**
* Assert that the streamed CSV response contains a row where all given header→value pairs match simultaneously.
*
* The first row of the CSV is treated as headers. Each subsequent row is combined with those headers
* to produce an associative map, and the assertion passes if at least one row satisfies every pair.
*
* Unlike assertSeeTextInStreamedResponse, this verifies that the values appear together in the same
* row under the correct column — not just anywhere in the file.
*
* Usage:
* ->assertSeePairsInStreamedResponse([
* 'First Name' => 'Luke',
* 'Last Name' => 'Skywalker',
* 'Username' => 'lskywalker',
* ])
*/
TestResponse::macro(
'assertSeePairsInStreamedResponse',
function (array $pair): self {