mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
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
This commit is contained in:
parent
21f3a51ebc
commit
fe3d2b938c
1 changed files with 7 additions and 4 deletions
|
@ -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 "</pre></div>\n";
|
||||
echo "<div class='msg'>" . __d('cake_dev', 'Test case: %s', $testName) . "</div>\n";
|
||||
list($show, $query) = $this->_getQueryLink();
|
||||
echo "<div class='msg'><a href='" . $this->baseUrl() . $query . "&filter=" . $test->getName() . "'>" . __d('cake_dev', 'Rerun only this test: %s', $testName) . "</a></div>\n";
|
||||
if (strpos($className, "PHPUnit_") === false) {
|
||||
list($show, $query) = $this->_getQueryLink();
|
||||
echo "<div class='msg'><a href='" . $this->baseUrl() . $query . "&filter=" . $test->getName() . "'>" . __d('cake_dev', 'Rerun only this test: %s', $testName) . "</a></div>\n";
|
||||
}
|
||||
echo "<div class='msg'>" . __d('cake_dev', 'Stack trace:') . '<br />' . $trace . "</div>\n";
|
||||
echo "</li>\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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue