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

## \PHPUnitReportTask
jump to top

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

`$format= 'noframes'`
Default value `noframes` Details

Type

`$inFile= 'testsuites.xml'`

the directory where the results XML can be found

Default value `testsuites.xml` Details

Type

`$styleDir= ''`
Details

Type

`$toDir= ''`
Details

Type

`boolean $useSortTable= 'false'`

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

Default value `false` Details

Type
  boolean

### Methods

`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 |  |

`getStyleSheet( ) :`
Returns the path to the XSL stylesheet
`init( ) :`
Initialize the task
`main( ) :`
The main entry point
Details

throws

`setFormat( $format ) :`
Set the format of the generated report. Must be noframes or frames.
Parameters

Name | Type | Description
--- | --- | ---
$format |  |

`setInFile( $inFile ) :`
Set the filename of the XML results file to use.
Parameters

Name | Type | Description
--- | --- | ---
$inFile |  |

`setStyleDir( $styleDir ) :`
Set the directory where the stylesheets are located.
Parameters

Name | Type | Description
--- | --- | ---
$styleDir |  |

`setToDir( $toDir ) :`
Set the directory where the files resulting from the transformation should be written to.
Parameters

Name | Type | Description
--- | --- | ---
$toDir |  |

`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 |

`transform( $document ) :`
Transforms the DOM document
Parameters

Name | Type | Description
--- | --- | ---
$document |  |

Documentation was generated by DocBlox 0.13.1.