mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
coverage manager fix windows IE styles,
testsuite help page typo fixes #4551 git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6736 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
f9ec1e752d
commit
471b6b0e2d
2 changed files with 14 additions and 3 deletions
|
@ -69,6 +69,13 @@ class TestSuiteShell extends Shell {
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
var $doCoverage = false;
|
var $doCoverage = false;
|
||||||
|
/**
|
||||||
|
* The headline for the test output
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @access public
|
||||||
|
*/
|
||||||
|
var $headline = 'CakePHP Test Shell';
|
||||||
/**
|
/**
|
||||||
* Initialization method installs Simpletest and loads all plugins
|
* Initialization method installs Simpletest and loads all plugins
|
||||||
*
|
*
|
||||||
|
@ -101,7 +108,7 @@ class TestSuiteShell extends Shell {
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function main() {
|
function main() {
|
||||||
$this->out('CakePHP Test Shell');
|
$this->out($this->headline);
|
||||||
$this->hr();
|
$this->hr();
|
||||||
|
|
||||||
if (count($this->args) > 0) {
|
if (count($this->args) > 0) {
|
||||||
|
@ -172,7 +179,7 @@ class TestSuiteShell extends Shell {
|
||||||
$this->out("\t\t cake testsuite bugs_me group bug // for the plugin bugs_me and its test group 'bug'");
|
$this->out("\t\t cake testsuite bugs_me group bug // for the plugin bugs_me and its test group 'bug'");
|
||||||
$this->out('');
|
$this->out('');
|
||||||
$this->out('Code Coverage Analysis: ');
|
$this->out('Code Coverage Analysis: ');
|
||||||
$this->out("\n\nAppend 'gov' to any of the above in order to enable code coverage analysis");
|
$this->out("\n\nAppend 'cov' to any of the above in order to enable code coverage analysis");
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Checks if the arguments supplied point to a valid test file and thus the shell can be run.
|
* Checks if the arguments supplied point to a valid test file and thus the shell can be run.
|
||||||
|
|
|
@ -465,7 +465,11 @@ class CodeCoverageManager {
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function __paintCodeline($class, $num, $line) {
|
function __paintCodeline($class, $num, $line) {
|
||||||
return '<div class="code-line '.trim($class).'"><span class="line-num">'.$num.'</span><span class="content">'.h($line).'</span></div>';
|
$line = h($line);
|
||||||
|
if (trim($line) == '') {
|
||||||
|
$line = ' '; // Win IE fix
|
||||||
|
}
|
||||||
|
return '<div class="code-line '.trim($class).'"><span class="line-num">'.$num.'</span><span class="content">'.$line.'</span></div>';
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Calculates the coverage percentage based on a line count and a covered line count
|
* Calculates the coverage percentage based on a line count and a covered line count
|
||||||
|
|
Loading…
Add table
Reference in a new issue