PHPUnitTask

This task runs testcases using the PHPUnit framework. It is a functional port of the Ant JUnit task.

NB: the identifiers phpunit2 (PHPUnit2Task) and phpunit3 (PHPUnit3Task) have been deprecated!

Table 142. Attributes

Name Type Description Default Required
printsummary Boolean Print one-line statistics for each testcase. false No
bootstrap String The name of a bootstrap file that is run before executing the tests. none No
codecoverage Boolean Gather code coverage information while running tests (requires Xdebug). false No
haltonerror Boolean Stop the build process if an error occurs during the test run. false No
haltonfailure Boolean Stop the build process if a test fails (errors are considered failures as well). false No
haltonincomplete Boolean Stop the build process if any incomplete tests are encountered. false No
haltonskipped Boolean Stop the build process if any skipped tests are encountered. false No
failureproperty String Name of property to set (to true) on failure. n/a No
errorproperty String Name of property to set (to true) on error. n/a No
incompleteproperty String Name of property to set (to true) on incomplete tests. n/a No
skippedproperty String Name of property to set (to true) on skipped tests. n/a No
usecustomerrorhandler Boolean Use a custom Phing/PHPUnit error handler to process PHP errors. true No
processisolation Boolean Enable process isolation when executing tests. false No
configuration String Path to a PHPUnit configuration file (such as phpunit.xml). Supported elements are: bootstrap, processIsolation, stopOnFailure, stopOnError, stopOnIncomplete and stopOnSkipped. Values provided overwrite other attributes! n/a No