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