# PHPUnitTestRunner

Extends \PHPUnit_Runner_BaseTestRunner Implements \PHPUnit_Framework_TestListener

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

author | Michiel Rook mrook@php.net
version | $Id: 3ed9accb8a370bd5d76c5caec723d2cf3f894a80 $
package | phing.tasks.ext.phpunit
since | 2.1.0

### Methods

## __construct

    __construct(\Project $project,  $groups = array(),  $excludeGroups = array(),  $processIsolation = false)

### Arguments

#### $project

`\Project`

#### $groups

``

#### $excludeGroups

``

#### $processIsolation

``

## An error occurred.

    addError(\PHPUnit_Framework_Test $test, \Exception $e, float $time)

### Arguments

#### $test

`\PHPUnit_Framework_Test`

#### $e

`\Exception`

#### $time

`float`

## A failure occurred.

    addFailure(\PHPUnit_Framework_Test $test, \PHPUnit_Framework_AssertionFailedError $e, float $time)

### Arguments

#### $test

`\PHPUnit_Framework_Test`

#### $e

`\PHPUnit_Framework_AssertionFailedError`

#### $time

`float`

## addFormatter

    addFormatter( $formatter)

### Arguments

#### $formatter

``

## Incomplete test.

    addIncompleteTest(\PHPUnit_Framework_Test $test, \Exception $e, float $time)

### Arguments

#### $test

`\PHPUnit_Framework_Test`

#### $e

`\Exception`

#### $time

`float`

## Risky test

    addRiskyTest(\PHPUnit_Framework_Test $test, \Exception $e, float $time)

### Arguments

#### $test

`\PHPUnit_Framework_Test`

#### $e

`\Exception`

#### $time

`float`

## Skipped test.

    addSkippedTest(\PHPUnit_Framework_Test $test, \Exception $e, float $time)

since | Method available since Release 3.0.0

### Arguments

#### $test

`\PHPUnit_Framework_Test`

#### $e

`\Exception`

#### $time

`float`

## composeMessage

    composeMessage( $message, \PHPUnit_Framework_Test $test, \Exception $e)

### Arguments

#### $message

``

#### $test

`\PHPUnit_Framework_Test`

#### $e

`\Exception`

## A test ended.

    endTest(\PHPUnit_Framework_Test $test, float $time)

### Arguments

#### $test

`\PHPUnit_Framework_Test`

#### $time

`float`

## A test suite ended.

    endTestSuite(\PHPUnit_Framework_TestSuite $suite)

since | Method available since Release 2.2.0

### Arguments

#### $suite

`\PHPUnit_Framework_TestSuite`

## getLastErrorMessage

    getLastErrorMessage()

## getLastFailureMessage

    getLastFailureMessage()

## getLastIncompleteMessage

    getLastIncompleteMessage()

## getLastSkippedMessage

    getLastSkippedMessage()

## getRetCode

    getRetCode()

## handleError

    handleError( $level,  $message,  $file,  $line)

### Arguments

#### $level

``

#### $message

``

#### $file

``

#### $line

``

## Run a test

    run(\PHPUnit_Framework_TestSuite $suite)

### Arguments

#### $suite

`\PHPUnit_Framework_TestSuite`

## Override to define how to handle a failed loading of a test suite.

    runFailed(string $message)

### Arguments

#### $message

`string`

## setCodecoverage

    setCodecoverage( $codecoverage)

### Arguments

#### $codecoverage

``

## setUseCustomErrorHandler

    setUseCustomErrorHandler( $useCustomErrorHandler)

### Arguments

#### $useCustomErrorHandler

``

## A test started.

    startTest(\PHPUnit_Framework_Test $test)

### Arguments

#### $test

`\PHPUnit_Framework_Test`

## A test suite started.

    startTestSuite(\PHPUnit_Framework_TestSuite $suite)

since | Method available since Release 2.2.0

### Arguments

#### $suite

`\PHPUnit_Framework_TestSuite`

## A test ended.

    testEnded(string $testName)

### Arguments

#### $testName

`string`

## A test failed.

    testFailed(integer $status, \PHPUnit_Framework_Test $test, \PHPUnit_Framework_AssertionFailedError $e)

### Arguments

#### $status

`integer`

#### $test

`\PHPUnit_Framework_Test`

#### $e

`\PHPUnit_Framework_AssertionFailedError`

## A test started.

    testStarted(string $testName)

### Arguments

#### $testName

`string`

### Constants

## SUCCESS

    SUCCESS

## FAILURES

    FAILURES

## ERRORS

    ERRORS

## INCOMPLETES

    INCOMPLETES

## SKIPPED

    SKIPPED

### Properties

## retCode

    retCode :

### Type(s)

``

## lastErrorMessage

    lastErrorMessage :

### Type(s)

``

## lastFailureMessage

    lastFailureMessage :

### Type(s)

``

## lastIncompleteMessage

    lastIncompleteMessage :

### Type(s)

``

## lastSkippedMessage

    lastSkippedMessage :

### Type(s)

``

## formatters

    formatters :

### Type(s)

``

## codecoverage

    codecoverage :

### Type(s)

``

## project

    project :

### Type(s)

``

## groups

    groups :

### Type(s)

``

## excludeGroups

    excludeGroups :

### Type(s)

``

## processIsolation

    processIsolation :

### Type(s)

``

## useCustomErrorHandler

    useCustomErrorHandler :

### Type(s)

``