Conditions | 3 |
Paths | 4 |
Total Lines | 19 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
51 | 12 | public static function assertDocumentLinksObjectContains(TestResponse $response, $expected) |
|
52 | { |
||
53 | 12 | if (!\is_array($expected)) { |
|
54 | 3 | static::invalidArgument( |
|
55 | 3 | 2, |
|
56 | 3 | 'array', |
|
57 | $expected |
||
58 | ); |
||
59 | } |
||
60 | |||
61 | // Decode JSON response |
||
62 | 9 | $json = $response->json(); |
|
63 | |||
64 | 9 | static::assertHasLinks($json); |
|
65 | |||
66 | 6 | $links = $json[Members::LINKS]; |
|
67 | |||
68 | 6 | foreach ($expected as $name => $value) { |
|
69 | 6 | static::assertLinksObjectContains($name, $value, $links); |
|
70 | } |
||
73 |