Source for file HTML.php
Documentation is available at HTML.php
// +------------------------------------------------------------------------+
// +------------------------------------------------------------------------+
// | Copyright (c) 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de>. |
// +------------------------------------------------------------------------+
// | This source file is subject to version 3.00 of the PHP License, |
// | that is available at http://www.php.net/license/3_0.txt. |
// | If you did not receive a copy of the PHP license and are unable to |
// | obtain it through the world-wide-web, please send a note to |
// | license@php.net so we can mail you a copy immediately. |
// +------------------------------------------------------------------------+
// $Id: HTML.php,v 1.12.2.1 2004/12/22 08:06:07 sebastian Exp $
require_once 'PHPUnit2/Extensions/CodeCoverage/Renderer.php';
* Renders Code Coverage information in HTML format.
* Formatting of the generated HTML can be achieved through
* CSS (codecoverage.css).
* td.ccLineNumber, td.ccCoveredLine, td.ccUncoveredLine, td.ccNotExecutableLine {
* font-family: monospace;
* td.ccLineNumber, td.ccCoveredLine {
* background-color: #aaaaaa;
* td.ccNotExecutableLine {
* @author Sebastian Bergmann <sb@sebastian-bergmann.de>
* @copyright Copyright © 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de>
* @license http://www.php.net/license/3_0.txt The PHP License, Version 3.0
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<link href="codecoverage.css" type="text/css" rel="stylesheet" />
' <table style="border: 1px solid black" cellspacing="0" cellpadding="0" width="100%">
' <tr><td class="ccLineNumber">%s</td><td class="%s">%s</td></tr>
// {{{ protected function header()
// {{{ protected function footer()
// {{{ protected function startSourceFile($sourceFile)
* @param string $sourceFile
return self ::sourceFileHeader;
// {{{ protected function endSourceFile($sourceFile)
* @param string $sourceFile
return self ::sourceFileFooter;
// {{{ protected function renderSourceFile($codeLines, $executedLines)
* @param array $codeLines
* @param array $executedLines
foreach ($codeLines as $codeLine) {
$lineStyle = 'ccNotExecutableLine';
if (isset ($executedLines[$line])) {
if ($executedLines[$line] > 0 ) {
$lineStyle = 'ccCoveredLine';
$lineStyle = 'ccUncoveredLine';
* vim600: et sw=2 ts=2 fdm=marker
Documentation generated on Mon, 11 Mar 2019 14:19:18 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|