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: 77ea1859b96ca9889af0e465b1a27a09600557da $

package

phing.tasks.ext.phpunit

since 2.1.0

Methods

__construct

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

Arguments

$project

\Project

$groups

array

$excludeGroups

array

$processIsolation

boolean

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

addListener

addListener( $listener) 

Arguments

$listener

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

checkResult

checkResult( $res) 

Arguments

$res

composeMessage

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

Arguments

$message

string

$test

\PHPUnit_Framework_Test

$e

\Exception

Response

string

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() : string

Response

string

getLastFailureMessage

getLastFailureMessage() : string

Response

string

getLastIncompleteMessage

getLastIncompleteMessage() : string

Response

string

getLastSkippedMessage

getLastSkippedMessage() : string

Response

string

handleError

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

Arguments

$level

$message

$file

$line

hasErrors

hasErrors() : boolean

Response

boolean

hasFailures

hasFailures() : boolean

Response

boolean

hasIncomplete

hasIncomplete() : boolean

Response

boolean

hasSkipped

hasSkipped() : boolean

Response

boolean

injectFilters

injectFilters(\PHPUnit_Framework_TestSuite $suite) 

Arguments

$suite

\PHPUnit_Framework_TestSuite

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) 
throws

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

Properties

hasErrors

hasErrors : 

Type(s)

hasFailures

hasFailures : 

Type(s)

hasIncomplete

hasIncomplete : 

Type(s)

hasSkipped

hasSkipped : 

Type(s)

lastErrorMessage

lastErrorMessage : 

Type(s)

lastFailureMessage

lastFailureMessage : 

Type(s)

lastIncompleteMessage

lastIncompleteMessage : 

Type(s)

lastSkippedMessage

lastSkippedMessage : 

Type(s)

formatters

formatters : 

Type(s)

listeners

listeners : 

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)