Skip to content

Commit

Permalink
Merge pull request #3 from nubium/better_exception_messages
Browse files Browse the repository at this point in the history
Puffin: better comparison exception messages
  • Loading branch information
northys authored Jul 25, 2016
2 parents e9cb81f + e7cd4ba commit 9020aa6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions module/Puffin.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public function seeVisualChanges($identifier, $elementID = 'body')
$deviationResult['deviationImage']->writeImage($compareScreenshotPath);

throw new ImageDeviationException(
'The deviation of the taken screenshot is too low - ' . $deviationResult['deviation'] . '.'
'Comparison result is too low - ' . number_format(($deviationResult['difference'] ?: 0), 15) . '.'
. PHP_EOL
. 'See ' . $compareScreenshotPath . ' for a deviation screenshot.',
$this->getReferenceScreenshotPath($identifier),
Expand Down Expand Up @@ -179,7 +179,7 @@ public function dontSeeVisualChanges($identifier, $elementID = 'body')
$deviationResult['deviationImage']->writeImage($compareScreenshotPath);

throw new ImageDeviationException(
'The deviation of the taken screenshot is too high - ' . $deviationResult['deviation'] . '.'
'Comparison result is too high - ' . $deviationResult['deviation'] . '.'
. PHP_EOL
. 'See ' . $compareScreenshotPath . ' for a deviation screenshot.',
$this->getReferenceScreenshotPath($identifier),
Expand Down

0 comments on commit 9020aa6

Please sign in to comment.