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

\PHPUnitTestRunner

Simple Testrunner for PHPUnit that runs all tests of a testsuite.

Extends from
\PHPUnit_Runner_BaseTestRunner
Implements
author
Michiel Rook
package
phing.tasks.ext.phpunit
since
2.1.0
version
$Id: PHPUnitTestRunner.php 1229 2011-07-25 19:54:19Z mrook $

Constants

Constant  SUCCESS = '0'
Constant  FAILURES = '1'
Constant  ERRORS = '2'
Constant  INCOMPLETES = '3'
Constant  SKIPPED = '4'

Properties

Propertyprivate  $codecoverage= 'false'
Default valuefalseDetails
Type
Propertyprivate  $excludeGroups= 'array'
Default valuearrayDetails
Type
Propertyprivate  $formatters= 'array'
Default valuearrayDetails
Type
Propertyprivate  $groups= 'array'
Default valuearrayDetails
Type
Propertyprivate  $lastErrorMessage= ''
Details
Type
Propertyprivate  $lastFailureMessage= ''
Details
Type
Propertyprivate  $lastIncompleteMessage= ''
Details
Type
Propertyprivate  $lastSkippedMessage= ''
Details
Type
Propertyprivate  $processIsolation= 'false'
Default valuefalseDetails
Type
Propertyprivate  $project= 'NULL'
Default valueNULLDetails
Type
Propertyprivate  $retCode= '0'
Default value0Details
Type
Propertyprivate  $useCustomErrorHandler= 'true'
Default valuetrueDetails
Type

Methods

methodpublic  __construct(  $project,  $groups = array,  $excludeGroups = array,  $processIsolation = false ) :
Parameters
Name Type Description
$project
$groups
$excludeGroups
$processIsolation
methodpublic  addError( \PHPUnit_Framework_Test $test, \Exception $e, float $time ) :
An error occurred.
Parameters
Name Type Description
$test \PHPUnit_Framework_Test
$e \Exception
$time float
methodpublic  addFailure( \PHPUnit_Framework_Test $test, \PHPUnit_Framework_AssertionFailedError $e, float $time ) :
A failure occurred.
Parameters
Name Type Description
$test \PHPUnit_Framework_Test
$e \PHPUnit_Framework_AssertionFailedError
$time float
methodpublic  addFormatter(  $formatter ) :
Parameters
Name Type Description
$formatter
methodpublic  addIncompleteTest( \PHPUnit_Framework_Test $test, \Exception $e, float $time ) :
Incomplete test.
Parameters
Name Type Description
$test \PHPUnit_Framework_Test
$e \Exception
$time float
methodpublic  addSkippedTest( \PHPUnit_Framework_Test $test, \Exception $e, float $time ) :
Skipped test.
Parameters
Name Type Description
$test \PHPUnit_Framework_Test
$e \Exception
$time float
Details
since
Method available since Release 3.0.0
methodprotected  clearStatus( ) :
Inherited from:
methodprotected  composeMessage(  $message,  $test,  $e ) :
Parameters
Name Type Description
$message
$test
$e
methodpublic  endTest( \PHPUnit_Framework_Test $test, float $time ) :
A test ended.
Parameters
Name Type Description
$test \PHPUnit_Framework_Test
$time float
methodpublic  endTestSuite( \PHPUnit_Framework_TestSuite $suite ) :
A test suite ended.
Parameters
Name Type Description
$suite \PHPUnit_Framework_TestSuite
Details
since
Method available since Release 2.2.0
methodpublic  getLastErrorMessage( ) :
methodpublic  getLastFailureMessage( ) :
methodpublic  getLastIncompleteMessage( ) :
methodpublic  getLastSkippedMessage( ) :
methodpublic  getLoader( ) :
Inherited from:
methodpublic  getRetCode( ) :
methodpublic  getTest( ) :
Inherited from:
methodpublic  handleError(  $level,  $message,  $file,  $line ) :
static
Parameters
Name Type Description
$level
$message
$file
$line
methodprotected  loadSuiteClass( ) :
Inherited from:
methodpublic  run(  $suite ) :
Run a test
Parameters
Name Type Description
$suite
methodprotected  runFailed( string $message ) :
Override to define how to handle a failed loading of a test suite.
Parameters
Name Type Description
$message string
methodpublic  setCodecoverage(  $codecoverage ) :
Parameters
Name Type Description
$codecoverage
methodpublic  setUseCustomErrorHandler(  $useCustomErrorHandler ) :
Parameters
Name Type Description
$useCustomErrorHandler
methodpublic  startTest( \PHPUnit_Framework_Test $test ) :
A test started.
Parameters
Name Type Description
$test \PHPUnit_Framework_Test
methodpublic  startTestSuite( \PHPUnit_Framework_TestSuite $suite ) :
A test suite started.
Parameters
Name Type Description
$suite \PHPUnit_Framework_TestSuite
Details
since
Method available since Release 2.2.0
methodpublic  testEnded( string $testName ) :
A test ended.
Parameters
Name Type Description
$testName string
methodpublic  testFailed( integer $status, \PHPUnit_Framework_Test $test, \PHPUnit_Framework_AssertionFailedError $e ) :
A test failed.
Parameters
Name Type Description
$status integer
$test \PHPUnit_Framework_Test
$e \PHPUnit_Framework_AssertionFailedError
methodpublic  testStarted( string $testName ) :
A test started.
Parameters
Name Type Description
$testName string
Documentation was generated by DocBlox 0.13.1.