Skip to content

Commit a19631d

Browse files
committed
fix wording
1 parent da3fc11 commit a19631d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

testing.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -207,11 +207,11 @@ If you would like to verify that the given array is an **exact** match for the J
207207
]);
208208
}
209209
}
210-
210+
211211
<a name="verify-structural-json-match"></a>
212212
#### Verify Structural JSON Match
213213

214-
It is also possible to verify that the response adheres to a specific structure. For this, you should use the `seeJsonStructure` method and pass it a list of (nested) keys:
214+
It is also possible to verify that a JSON response adheres to a specific structure. For this, you should use the `seeJsonStructure` method and pass it a list of (nested) keys:
215215

216216
<?php
217217

@@ -226,15 +226,15 @@ It is also possible to verify that the response adheres to a specific structure.
226226
{
227227
$this->get('/user/1')
228228
->seeJsonStructure([
229-
'name',
229+
'name',
230230
'pet' => [
231231
'name', 'age'
232232
]
233233
]);
234234
}
235235
}
236236

237-
The above example illustrates an expectation of receiving a `name` of the `user` and a nested `pet` object with its own `name` and `age`. `seeJsonStructure` will only verify the structure as passed as the argument; if the `pet` would also have a `weight`, the test case will still pass.
237+
The above example illustrates an expectation of receiving a `name` and a nested `pet` object with its own `name` and `age`. `seeJsonStructure` will not fail if additional keys are present in the response. For example, the test would still pass if the `pet` had a `weight` attribute.
238238

239239
<a name="sessions-and-authentication"></a>
240240
### Sessions / Authentication

0 commit comments

Comments
 (0)