@@ 62-67 (lines=6) @@ | ||
59 | $required = array_diff($expectedKeys, $givenKeys); |
|
60 | ||
61 | $message = 'Keys do not match requirements'; |
|
62 | if (!empty($additional)) { |
|
63 | $message .= sprintf( |
|
64 | ', additional keys "%s" found', |
|
65 | implode('", "', array_diff($givenKeys, $expectedKeys)) |
|
66 | ); |
|
67 | } |
|
68 | ||
69 | if (!empty($required)) { |
|
70 | $message .= sprintf( |
|
@@ 69-74 (lines=6) @@ | ||
66 | ); |
|
67 | } |
|
68 | ||
69 | if (!empty($required)) { |
|
70 | $message .= sprintf( |
|
71 | ', required keys "%s" are missing', |
|
72 | implode('", "', array_diff($expectedKeys, $givenKeys)) |
|
73 | ); |
|
74 | } |
|
75 | } |
|
76 | ||
77 | throw new AssertionFailedException($message, 0, $propertyPath, $array); |