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