Fixed syntax to work with PHP5.3

This commit is contained in:
Luis Cano 2017-08-08 14:28:11 -04:00
parent 9f175f22f4
commit 3307665cbb

View file

@ -270,7 +270,8 @@ class CakeHtmlReporter extends CakeBaseReporter {
if (class_exists('PHPUnit_Util_Diff')) {
$diffs = PHPUnit_Util_Diff::diff($expectedMsg, $actualMsg);
} elseif (class_exists('SebastianBergmann\Diff\Differ')) {
$diffs = (new SebastianBergmann\Diff\Differ())->diff($expectedMsg, $actualMsg);
$differ = new SebastianBergmann\Diff\Differ();
$diffs = $differ->diff($expectedMsg, $actualMsg);
}
echo "<br />" . $this->_htmlEntities($diffs);