Moodle  2.2.1
http://www.collinsharper.com
moodle_coverage_reporter Class Reference
Inheritance diagram for moodle_coverage_reporter:
Collaboration diagram for moodle_coverage_reporter:

Public Member Functions

 __construct ($heading='Coverage Report', $dir='report')
 generateReport (&$data)

Static Public Member Functions

static get_summary_info ($type)
static print_summary_info ($type)
static get_link_to_latest ($type)
static print_link_to_latest ($type)

Protected Member Functions

 writeIndexFileTableRow ($fileLink, $realFile, $fileCoverage)
 markFile ($phpFile, $fileLink, &$coverageLines)
 updateGrandTotals (&$coverageCounts)

Detailed Description

Definition at line 325 of file simpletestcoveragelib.php.


Constructor & Destructor Documentation

__construct ( heading = 'Coverage Report',
dir = 'report' 
)

Definition at line 327 of file simpletestcoveragelib.php.


Member Function Documentation

generateReport ( &$  data)

Generate the static report

Overrided to generate the serialised object to be displayed inline with the test results.

Parameters:
&$dataReference to Coverage Data

Reimplemented from HtmlCoverageReporter.

Definition at line 395 of file simpletestcoveragelib.php.

Here is the call graph for this function:

static get_link_to_latest ( type) [static]

Return the html code needed to browse latest code coverage complete report of the given test type

Parameters:
string$typeof the test to return last execution summary (dbtest|unittest)
Returns:
string html contents of the summary

Definition at line 479 of file simpletestcoveragelib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

static get_summary_info ( type) [static]

Return the html contents for the summary for the last execution of the given test type

Parameters:
string$typeof the test to return last execution summary (dbtest|unittest)
Returns:
string html contents of the summary

Definition at line 425 of file simpletestcoveragelib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

markFile ( phpFile,
fileLink,
&$  coverageLines 
) [protected]

Mark a source code file based on the coverage data gathered

Overrided to transform names and links to shorter format

Parameters:
$phpFileName of the actual source file
$fileLinkLink to the html mark-up file for the $phpFile
&$coverageLinesCoverage recording for $phpFile
Returns:
boolean FALSE on failure protected

Reimplemented from HtmlCoverageReporter.

Definition at line 365 of file simpletestcoveragelib.php.

static print_link_to_latest ( type) [static]

Print the html code needed to browse latest code coverage complete report of the given test type

Parameters:
string$typeof the test to return last execution summary (dbtest|unittest)
Returns:
string html contents of the summary

Definition at line 512 of file simpletestcoveragelib.php.

Here is the call graph for this function:

static print_summary_info ( type) [static]

Print the html contents for the summary for the last execution of the given test type

Parameters:
string$typeof the test to return last execution summary (dbtest|unittest)
Returns:
string html contents of the summary

Definition at line 468 of file simpletestcoveragelib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

updateGrandTotals ( &$  coverageCounts) [protected]

Update the grand totals

Overrided to avoid the call to recordFileCoverageInfo() because it has been already executed by writeIndexFile() and cause files to be duplicated in the fileCoverage property

Reimplemented from CoverageReporter.

Definition at line 381 of file simpletestcoveragelib.php.

writeIndexFileTableRow ( fileLink,
realFile,
fileCoverage 
) [protected]

Writes one row in the index.html table to display filename and coverage recording.

Overrided to transform names and links to shorter format

Parameters:
$fileLinklink to html details file.
$realFilepath to real PHP file.
$fileCoverageCoverage recording for that file.
Returns:
string HTML code for a single row. protected

Reimplemented from HtmlCoverageReporter.

Definition at line 344 of file simpletestcoveragelib.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations