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 | 1 | 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 | 1 | public function jsonResponse($key = null) |
|
41 | |||
42 | /** |
||
43 | * Assert that the JSON response has a given typed structure. |
||
44 | * |
||
45 | * @param array|null $structure |
||
46 | * @param array|null $responseData |
||
47 | * @return $this |
||
48 | */ |
||
49 | 1 | public function seeJsonTypedStructure(array $structure = null, $responseData = null) |
|
77 | } |
||
78 |