Abiding to code standards

This commit is contained in:
Luis Cano 2017-08-08 12:59:33 -04:00
parent 90f14bc07b
commit 9f175f22f4

View file

@ -267,12 +267,8 @@ class CakeHtmlReporter extends CakeBaseReporter {
if ((is_string($actualMsg) && is_string($expectedMsg)) || (is_array($actualMsg) && is_array($expectedMsg))) {
$diffs = "";
// PHPUnit 3.7.38 support
if (class_exists('PHPUnit_Util_Diff')) {
$diffs = PHPUnit_Util_Diff::diff($expectedMsg, $actualMsg);
// PHPUnit 4.x and 5.x support
} elseif (class_exists('SebastianBergmann\Diff\Differ')) {
$diffs = (new SebastianBergmann\Diff\Differ())->diff($expectedMsg, $actualMsg);
}