# tasks/ext/phpunit/PHPUnitReportTask.php

$Id: PHPUnitReportTask.php 1387 2011-12-10 11:05:25Z mrook $

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

This software consists of voluntary contributions made by many individuals and is licensed under the LGPL. For more information please see http://phing.info.

## \PHPUnitReportTask
jump to top

Package: phing\tasks\ext\phpunit

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.

Parent(s)
  \Task < \ProjectComponent
Author
  Michiel Rook
Since
  2.1.0
Version
  $Id: PHPUnitReportTask.php 1387 2011-12-10 11:05:25Z mrook $

### Properties

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

Type
  n/a

`$inFile= '"testsuites.xml"'`

the directory where the results XML can be found

Default value`"testsuites.xml"`Details

Type
  n/a

`$styleDir= '""'`
Default value`""`Details

Type
  n/a

`$toDir= '""'`
Default value`""`Details

Type
  n/a

`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 ) : void`

Fixes DOM document tree: - adds package="default" to 'testsuite' elements without package attribute - removes outer 'testsuite' container(s)

Parameters

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

`getDescription( ) : void`

`getLocation( ) : void`

`getOwningTarget( ) : void`

`getProject( ) : void`

`getRegisterSlot( ) : void`

`getRuntimeConfigurableWrapper( ) : void`

`getStyleSheet( ) : void`

Returns the path to the XSL stylesheet

`getTaskName( ) : void`

`getTaskType( ) : void`

`init( ) : void`

Initialize the task

`log( ) : void`

`main( ) : void`

The main entry point

Throws

Exception | Description
--- | ---
\BuildException |

`maybeConfigure( ) : void`

`perform( ) : void`

`setDescription( ) : void`

`setFormat( $format ) : void`

Set the format of the generated report. Must be noframes or frames.

Parameters

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

`setInFile( $inFile ) : void`

Set the filename of the XML results file to use.

Parameters

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

`setLocation( ) : void`

`setOwningTarget( ) : void`

`setProject( ) : void`

`setRuntimeConfigurableWrapper( ) : void`

`setStyleDir( $styleDir ) : void`

Set the directory where the stylesheets are located.

Parameters

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

`setTaskName( ) : void`

`setTaskType( ) : void`

`setToDir( $toDir ) : void`

Set the directory where the files resulting from the transformation should be written to.

Parameters

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

`setUseSortTable( boolean $useSortTable ) : void`

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 ) : void`

Transforms the DOM document

Parameters

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

Documentation was generated by DocBlox 0.17.1.