Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
22 | 12 | public static function assertDocumentLinksObjectEquals(TestResponse $response, $expected) |
|
23 | { |
||
24 | 12 | if (!\is_array($expected)) { |
|
|
|||
25 | 3 | static::invalidArgument( |
|
26 | 3 | 2, |
|
27 | 3 | 'array', |
|
28 | $expected |
||
29 | ); |
||
30 | } |
||
31 | |||
32 | // Decode JSON response |
||
33 | 9 | $json = $response->json(); |
|
34 | |||
35 | 9 | static::assertHasLinks($json); |
|
36 | |||
37 | 6 | $links = $json[Members::LINKS]; |
|
38 | |||
39 | 6 | static::assertLinksObjectEquals($expected, $links); |
|
40 | 3 | } |
|
73 |