[ Index ]

PHP Cross Reference of Limb3

title

Body

[close]

/tests_runner/lib/spikephpcoverage/src/reporter/ -> HtmlCoverageReporter.php (summary)

(no description)

File Size: 612 lines (25 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

HtmlCoverageReporter:: (17 methods):
  __construct()
  generateReport()
  writeIndexFileHeader()
  writeIndexFileFooter()
  createJSDir()
  createImagesDir()
  createStyleDir()
  writeIndexFileTableHead()
  writeIndexFileTableRow()
  writeIndexFileGrandTotalPercentage()
  writeIndexFile()
  writePhpFileHeader()
  writePhpFileFooter()
  markFile()
  writeFileTableHead()
  writeFileTableRow()
  preserveSpacing()


Class: HtmlCoverageReporter  - X-Ref

Class that implements HTML Coverage Reporter.

__construct($heading="Coverage Report",$style="",$dir="report")   X-Ref
Constructor method (PHP5 only)

param: $heading Heading of the report (shown as title)
param: $style Name of the stylesheet file
param: $dir Directory where the report files should be dumped

generateReport(&$data)   X-Ref
Implementaion of generateReport abstract function.
This is the only function that will be called
by the instrumentor.

param: &$data  Reference to Coverage Data

writeIndexFileHeader()   X-Ref
Write the index file header to a string

return: string String containing HTML code for the index file header

writeIndexFileFooter()   X-Ref
Write the index file footer to a string

return: string String containing HTML code for the index file footer.

createJSDir()   X-Ref
Create a directory for storing Javascript for the report


createImagesDir()   X-Ref
Create a directory for storing images for the report


createStyleDir()   X-Ref
No description

writeIndexFileTableHead()   X-Ref
Writes the table heading for index.html

return: string Table heading row code

writeIndexFileTableRow($fileLink, $realFile, $fileCoverage)   X-Ref
Writes one row in the index.html table to display filename
and coverage recording.

param: $fileLink link to html details file.
param: $realFile path to real PHP file.
param: $fileCoverage Coverage recording for that file.
return: string HTML code for a single row.

writeIndexFileGrandTotalPercentage()   X-Ref
Writes the grand total for coverage recordings on the index.html

return: string HTML code for grand total row

writeIndexFile()   X-Ref
Writes index.html file from all coverage recordings.

return: boolean FALSE on failure

writePhpFileHeader($filename, $fileLink)   X-Ref
Write the header for the source file with mark-up

param: $filename Name of the php file
return: string String containing the HTML for PHP file header

writePhpFileFooter()   X-Ref
Write the footer for the source file with mark-up

return: string String containing the HTML for PHP file footer

markFile($phpFile, $fileLink, &$coverageLines)   X-Ref
Mark a source code file based on the coverage data gathered

param: $phpFile Name of the actual source file
param: $fileLink Link to the html mark-up file for the $phpFile
param: &$coverageLines Coverage recording for $phpFile
return: boolean FALSE on failure

writeFileTableHead()   X-Ref
Writes table heading for file details table.

return: string HTML string representing one table row.

writeFileTableRow($type, $lineCnt, $line, $coverageLineCnt)   X-Ref
Write a line for file details table.

param: $color Text color
param: $bgcolor Row bgcolor
param: $lineCnt Line number
param: $line The source code line
param: $coverageLineCnt Number of time the line was executed.
return: string HTML code for a table row.

preserveSpacing($string)   X-Ref
Changes all tabs and spaces with HTML non-breakable spaces.

param: $string String containing spaces and tabs.
return: string HTML string with replacements.



Generated: Tue Dec 2 03:54:09 2008 Cross-referenced by PHPXref 0.7