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:
DarkAngelBGE 2008-04-30 14:08:29 +00:00
parent f9ec1e752d
commit 471b6b0e2d
2 changed files with 14 additions and 3 deletions

View file

@ -69,6 +69,13 @@ class TestSuiteShell extends Shell {
* @access public
*/
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
*
@ -101,7 +108,7 @@ class TestSuiteShell extends Shell {
* @access public
*/
function main() {
$this->out('CakePHP Test Shell');
$this->out($this->headline);
$this->hr();
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('');
$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.

View file

@ -465,7 +465,11 @@ class CodeCoverageManager {
* @access private
*/
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 = '&nbsp;'; // 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