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: 65affc464b743a2ef7a41d714b1acb1fa5b8bd3b $

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

setCodecoverage

setCodecoverage($codecoverage) 

Arguments

$codecoverage

setUseCustomErrorHandler

setUseCustomErrorHandler($useCustomErrorHandler) 

Arguments

$useCustomErrorHandler

addFormatter

addFormatter($formatter) 

Arguments

$formatter

handleError

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

Arguments

$level

$message

$file

$line

Run a test

run(\PHPUnit_Framework_TestSuite $suite) 

Arguments

$suite

\PHPUnit_Framework_TestSuite

getRetCode

getRetCode() 

getLastErrorMessage

getLastErrorMessage() 

getLastFailureMessage

getLastFailureMessage() 

getLastIncompleteMessage

getLastIncompleteMessage() 

getLastSkippedMessage

getLastSkippedMessage() 

composeMessage

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

Arguments

$message

$test

\PHPUnit_Framework_Test

$e

\Exception

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

Incomplete test.

addIncompleteTest(\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

A test started.

testStarted(string $testName) 

Arguments

$testName

string

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

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

runFailed(string $message) 

Arguments

$message

string

A test suite started.

startTestSuite(\PHPUnit_Framework_TestSuite $suite) 
since

Method available since Release 2.2.0

Arguments

$suite

\PHPUnit_Framework_TestSuite

A test suite ended.

endTestSuite(\PHPUnit_Framework_TestSuite $suite) 
since

Method available since Release 2.2.0

Arguments

$suite

\PHPUnit_Framework_TestSuite

A test started.

startTest(\PHPUnit_Framework_Test $test) 

Arguments

$test

\PHPUnit_Framework_Test

A test ended.

endTest(\PHPUnit_Framework_Test $test, float $time) 

Arguments

$test

\PHPUnit_Framework_Test

$time

float

Constants

SUCCESS

SUCCESS

FAILURES

FAILURES

ERRORS

ERRORS

INCOMPLETES

INCOMPLETES

SKIPPED

SKIPPED

Properties

retCode

retCode : 

lastErrorMessage

lastErrorMessage : 

lastFailureMessage

lastFailureMessage : 

lastIncompleteMessage

lastIncompleteMessage : 

lastSkippedMessage

lastSkippedMessage : 

formatters

formatters : 

codecoverage

codecoverage : 

project

project : 

groups

groups : 

excludeGroups

excludeGroups : 

processIsolation

processIsolation : 

useCustomErrorHandler

useCustomErrorHandler :