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

## \PHPUnitTask
jump to top

Runs PHPUnit tests.

Use {@link Project#createTask} to register a new Task.

Extends from
  \Task
see
  \BatchTest
author
  Michiel Rook
copyright
  2001,2002 THYRELL. All rights reserved
package
  phing.tasks.ext.phpunit
since
  2.1.0
version
  $Id: PHPUnitTask.php 1229 2011-07-25 19:54:19Z mrook $

### Properties

`$batchtests= 'array'`
Default value `array` Details

Type

`$bootstrap= ''`
Details

Type

`$codecoverage= 'false'`
Default value `false` Details

Type

`$errorproperty= ''`
Details

Type

`$excludeGroups= 'array'`
Default value `array` Details

Type

`$failureproperty= ''`
Details

Type

`$formatters= 'array'`
Default value `array` Details

Type

`$groups= 'array'`
Default value `array` Details

Type

`$haltonerror= 'false'`
Default value `false` Details

Type

`$haltonfailure= 'false'`
Default value `false` Details

Type

`$haltonincomplete= 'false'`
Default value `false` Details

Type

`$haltonskipped= 'false'`
Default value `false` Details

Type

`$incompleteproperty= ''`
Details

Type

`$printsummary= 'false'`
Default value `false` Details

Type

`$processIsolation= 'false'`
Default value `false` Details

Type

`$skippedproperty= ''`
Details

Type

`$testfailed= 'false'`
Default value `false` Details

Type

`$testfailuremessage= ''`
Details

Type

`$usecustomerrorhandler= 'true'`
Default value `true` Details

Type

### Methods

`addFormatter( \FormatterElement $fe ) :`
Add a new formatter to all tests of this task.
Parameters

Name | Type | Description
--- | --- | ---
$fe | \FormatterElement | formatter element

`createBatchTest( ) : \BatchTest`
Adds a set of tests based on pattern matching.
Returns

Type | Description
--- | ---
\BatchTest |

`execute( $suite ) :`
Parameters

Name | Type | Description
--- | --- | ---
$suite |  |

Details

throws

`getDefaultOutput( ) :`
`getHaltonfailure( ) :`
`getHaltonincomplete( ) :`
`getHaltonskipped( ) :`
`init( ) :`
Initialize Task.

This method includes any necessary PHPUnit libraries and triggers appropriate error if they cannot be found. This is not done in header because we may want this class to be loaded w/o triggering an error.

`main( ) :`
The main entry point
Details

throws

`setBootstrap( string $bootstrap ) :`
Sets the name of a bootstrap file that is run before executing the tests
Parameters

Name | Type | Description
--- | --- | ---
$bootstrap | string | the name of the bootstrap file

`setCodecoverage( $codecoverage ) :`
Parameters

Name | Type | Description
--- | --- | ---
$codecoverage |  |

`setErrorproperty( $value ) :`
Parameters

Name | Type | Description
--- | --- | ---
$value |  |

`setExcludeGroups( $excludeGroups ) :`
Parameters

Name | Type | Description
--- | --- | ---
$excludeGroups |  |

`setFailureproperty( $value ) :`
Parameters

Name | Type | Description
--- | --- | ---
$value |  |

`setGroups( $groups ) :`
Parameters

Name | Type | Description
--- | --- | ---
$groups |  |

`setHaltonerror( $value ) :`
Parameters

Name | Type | Description
--- | --- | ---
$value |  |

`setHaltonfailure( $value ) :`
Parameters

Name | Type | Description
--- | --- | ---
$value |  |

`setHaltonincomplete( $value ) :`
Parameters

Name | Type | Description
--- | --- | ---
$value |  |

`setHaltonskipped( $value ) :`
Parameters

Name | Type | Description
--- | --- | ---
$value |  |

`setIncompleteproperty( $value ) :`
Parameters

Name | Type | Description
--- | --- | ---
$value |  |

`setPrintsummary( $printsummary ) :`
Parameters

Name | Type | Description
--- | --- | ---
$printsummary |  |

`setProcessIsolation( $processIsolation ) :`
Parameters

Name | Type | Description
--- | --- | ---
$processIsolation |  |

`setSkippedproperty( $value ) :`
Parameters

Name | Type | Description
--- | --- | ---
$value |  |

`setUseCustomErrorHandler( $usecustomerrorhandler ) :`
Parameters

Name | Type | Description
--- | --- | ---
$usecustomerrorhandler |  |

Documentation was generated by DocBlox 0.13.1.