Skip to content

Commit 17db15e

Browse files
committed
Add additional rows to AssociativeArray::additionalFailureDescription()
1 parent bfc8313 commit 17db15e

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎src/Constraint/AssociativeArray.php‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,16 @@ protected function additionalFailureDescription($other): string
182182
]);
183183
}
184184

185+
if (is_array($other)) {
186+
foreach (array_diff_key($other, $this->constraints) as $key => $value) {
187+
$table->addRow([
188+
$this->exporter()->export($key),
189+
$this->exporter()->shortenedExport($value),
190+
''
191+
]);
192+
}
193+
}
194+
185195
$output = $table->getTable();
186196
$output .= sprintf(
187197
"[%s] Allow missing; [%s] Allow additional\n",

0 commit comments

Comments
 (0)