mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 11:06:15 +00:00
Making CLI case code coverage reports include text.
This commit is contained in:
parent
84e70c1db1
commit
07b43be125
1 changed files with 8 additions and 2 deletions
|
@ -681,7 +681,6 @@ class CodeCoverageManager {
|
|||
$manager =& CodeCoverageManager::getInstance();
|
||||
$codeCoverage = $manager->__calcCoverage($lineCount, $coveredCount);
|
||||
$class = 'bad';
|
||||
|
||||
if ($codeCoverage > 50) {
|
||||
$class = 'ok';
|
||||
}
|
||||
|
@ -702,7 +701,14 @@ class CodeCoverageManager {
|
|||
function __paintHeaderCli($lineCount, $coveredCount, $report) {
|
||||
$manager =& CodeCoverageManager::getInstance();
|
||||
$codeCoverage = $manager->__calcCoverage($lineCount, $coveredCount);
|
||||
return $report = 'Code Coverage: ' . $codeCoverage . '%';
|
||||
$class = 'bad';
|
||||
if ($codeCoverage > 50) {
|
||||
$class = 'ok';
|
||||
}
|
||||
if ($codeCoverage > 80) {
|
||||
$class = 'good';
|
||||
}
|
||||
return $report = "Code Coverage: $codeCoverage% ($class)\n";
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue