1 | <?php |
||
7 | trait AssertJsonResponse |
||
8 | { |
||
9 | use AssertArrays, MakesHttpRequests; |
||
10 | |||
11 | /** |
||
12 | * Assert that the JSON response has exactly the given structure. |
||
13 | * |
||
14 | * @param array $structure |
||
15 | * @param array|null $responseData |
||
16 | * |
||
17 | * @return $this |
||
18 | */ |
||
19 | public function seeJsonStructureEquals(array $structure, $responseData = null) |
||
27 | |||
28 | /** |
||
29 | * Return the json response or a part of it as an array. |
||
30 | * |
||
31 | * @param string $key |
||
32 | * |
||
33 | * @return mixed |
||
34 | */ |
||
35 | public function jsonResponse($key = null) |
||
41 | } |
||
42 |