From fe3d2b938cd2d83f541f238da6a7c8db2cc9d69d Mon Sep 17 00:00:00 2001 From: Esteban Date: Wed, 24 Dec 2014 08:40:56 -0300 Subject: [PATCH] Added conditional to do not show rerun link if is warning of no test present CS Fix Update CakeHtmlReporter.php Removed spaces in array return --- lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php b/lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php index 9ac13cbea..3e68005f3 100644 --- a/lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php +++ b/lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php @@ -248,7 +248,8 @@ class CakeHtmlReporter extends CakeBaseReporter { */ public function paintFail($message, $test) { $trace = $this->_getStackTrace($message); - $testName = get_class($test) . '::' . $test->getName() . '()'; + $className = get_class($test); + $testName = $className . '::' . $test->getName() . '()'; $actualMsg = $expectedMsg = null; if (method_exists($message, 'getComparisonFailure')) { @@ -269,8 +270,10 @@ class CakeHtmlReporter extends CakeBaseReporter { echo "\n"; echo "
" . __d('cake_dev', 'Test case: %s', $testName) . "
\n"; - list($show, $query) = $this->_getQueryLink(); - echo "
" . __d('cake_dev', 'Rerun only this test: %s', $testName) . "
\n"; + if (strpos($className, "PHPUnit_") === false) { + list($show, $query) = $this->_getQueryLink(); + echo "
" . __d('cake_dev', 'Rerun only this test: %s', $testName) . "
\n"; + } echo "
" . __d('cake_dev', 'Stack trace:') . '
' . $trace . "
\n"; echo "\n"; } @@ -407,7 +410,7 @@ class CakeHtmlReporter extends CakeBaseReporter { } $show = $this->_queryString($show); $query = $this->_queryString($query); - return array( $show, $query ); + return array($show, $query); } }