diff --git a/tests/Rules/AbstractRuleTestCase.php b/tests/Rules/AbstractRuleTestCase.php index 2c99c332..23d600db 100644 --- a/tests/Rules/AbstractRuleTestCase.php +++ b/tests/Rules/AbstractRuleTestCase.php @@ -75,7 +75,12 @@ protected function checkRule( $id = $violation->getIdentifier()?->toString() ?? ''; if (isset($messages[$id])) { - static::fail(sprintf('Two violations have the same identifier "%s".', $id)); + static::fail(sprintf( + 'Two violations have the same identifier "%s": the messages are "%s" and "%s".', + $id, + $messages[$id], + $message, + )); } $messages[$id] = $message;