classes/phing/tasks/ext/phpunit/PHPUnitReportTask.php

\PHPUnitReportTask

Transform a PHPUnit xml report using XSLT.

This transformation generates an html report in either framed or non-framed style. The non-framed style is convenient to have a concise report via mail, the framed report is much more convenient if you want to browse into different packages or testcases since it is a Javadoc like report.

Extends from
\Task
author
Michiel Rook
copyright
2001,2002 THYRELL. All rights reserved
package
phing.tasks.ext.phpunit
since
2.1.0
version
$Id: PHPUnitReportTask.php 1272 2011-08-15 15:30:15Z mrook $

Properties

Propertyprivate  $format= 'noframes'
Default valuenoframesDetails
Type
Propertyprivate  $inFile= 'testsuites.xml'

the directory where the results XML can be found

Default valuetestsuites.xmlDetails
Type
Propertyprivate  $styleDir= ''
Details
Type
Propertyprivate  $toDir= ''
Details
Type
Propertyprivateboolean  $useSortTable= 'false'

Whether to use the sorttable JavaScript library, defaults to false See {@link http://www.kryogenix.org/code/browser/sorttable/)}

Default valuefalseDetails
Type
boolean

Methods

methodprotected  fixDocument(  $document ) :
Fixes DOM document tree: - adds package="default" to 'testsuite' elements without package attribute - removes outer 'testsuite' container(s)
Parameters
Name Type Description
$document
methodprotected  getStyleSheet( ) :
Returns the path to the XSL stylesheet
methodpublic  init( ) :
Initialize the task
methodpublic  main( ) :
The main entry point
Details
throws
methodpublic  setFormat(  $format ) :
Set the format of the generated report. Must be noframes or frames.
Parameters
Name Type Description
$format
methodpublic  setInFile(  $inFile ) :
Set the filename of the XML results file to use.
Parameters
Name Type Description
$inFile
methodpublic  setStyleDir(  $styleDir ) :
Set the directory where the stylesheets are located.
Parameters
Name Type Description
$styleDir
methodpublic  setToDir(  $toDir ) :
Set the directory where the files resulting from the transformation should be written to.
Parameters
Name Type Description
$toDir
methodpublic  setUseSortTable( boolean $useSortTable ) :
Sets whether to use the sorttable JavaScript library, defaults to false See {@link http://www.kryogenix.org/code/browser/sorttable/)}
Parameters
Name Type Description
$useSortTable boolean
methodprotected  transform(  $document ) :
Transforms the DOM document
Parameters
Name Type Description
$document
Documentation was generated by DocBlox 0.13.1.