tasks/ext/phpunit/PHPUnitTestRunner.php

Show: inherited
Table of Contents

$Id: PHPUnitTestRunner.php 1354 2011-11-01 14:12:42Z mrook $

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

This software consists of voluntary contributions made by many individuals and is licensed under the LGPL. For more information please see http://phing.info.

\PHPUnitTestRunner

Package: phing\tasks\ext\phpunit

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

Implements
Parent(s)
\PHPUnit_Runner_BaseTestRunner
Author
Michiel Rook  
Since
2.1.0  
Version
$Id: PHPUnitTestRunner.php 1354 2011-11-01 14:12:42Z mrook $  

Constants

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

Properties

Propertyprivate  $codecoverage= 'null'
Default valuenullDetails
Type
n/a
Propertyprivate  $excludeGroups= 'array()'
Default valuearray()Details
Type
n/a
Propertyprivate  $formatters= 'array()'
Default valuearray()Details
Type
n/a
Propertyprivate  $groups= 'array()'
Default valuearray()Details
Type
n/a
Propertyprivate  $lastErrorMessage= ''''
Default value''Details
Type
n/a
Propertyprivate  $lastFailureMessage= ''''
Default value''Details
Type
n/a
Propertyprivate  $lastIncompleteMessage= ''''
Default value''Details
Type
n/a
Propertyprivate  $lastSkippedMessage= ''''
Default value''Details
Type
n/a
Propertyprivate  $processIsolation= 'false'
Default valuefalseDetails
Type
n/a
Propertyprivate  $project= 'NULL'
Default valueNULLDetails
Type
n/a
Propertyprivate  $retCode= '0'
Default value0Details
Type
n/a
Propertyprivate  $useCustomErrorHandler= 'true'
Default valuetrueDetails
Type
n/a

Methods

methodpublic__construct(  $project,  $groups = array(),  $excludeGroups = array(),  $processIsolation = false ) : void

Parameters
Name Type Description
$project
$groups
$excludeGroups
$processIsolation
methodpublicaddError( \PHPUnit_Framework_Test $test, \Exception $e, float $time ) : void

An error occurred.

Parameters
Name Type Description
$test \PHPUnit_Framework_Test
$e \Exception
$time float
methodpublicaddFailure( \PHPUnit_Framework_Test $test, \PHPUnit_Framework_AssertionFailedError $e, float $time ) : void

A failure occurred.

Parameters
Name Type Description
$test \PHPUnit_Framework_Test
$e \PHPUnit_Framework_AssertionFailedError
$time float
methodpublicaddFormatter(  $formatter ) : void

Parameters
Name Type Description
$formatter
methodpublicaddIncompleteTest( \PHPUnit_Framework_Test $test, \Exception $e, float $time ) : void

Incomplete test.

Parameters
Name Type Description
$test \PHPUnit_Framework_Test
$e \Exception
$time float
methodpublicaddSkippedTest( \PHPUnit_Framework_Test $test, \Exception $e, float $time ) : void

Skipped test.

Parameters
Name Type Description
$test \PHPUnit_Framework_Test
$e \Exception
$time float
Details
Since
Method available since Release 3.0.0  
methodprotectedclearStatus( ) : void

methodprotectedcomposeMessage(  $message,  $test,  $e ) : void

Parameters
Name Type Description
$message
$test
$e
methodpublicendTest( \PHPUnit_Framework_Test $test, float $time ) : void

A test ended.

Parameters
Name Type Description
$test \PHPUnit_Framework_Test
$time float
methodpublicendTestSuite( \PHPUnit_Framework_TestSuite $suite ) : void

A test suite ended.

Parameters
Name Type Description
$suite \PHPUnit_Framework_TestSuite
Details
Since
Method available since Release 2.2.0  
methodpublicgetLastErrorMessage( ) : void

methodpublicgetLastFailureMessage( ) : void

methodpublicgetLastIncompleteMessage( ) : void

methodpublicgetLastSkippedMessage( ) : void

methodpublicgetLoader( ) : void

methodpublicgetRetCode( ) : void

methodpublicgetTest( ) : void

methodpublichandleError(  $level,  $message,  $file,  $line ) : void

Parameters
Name Type Description
$level
$message
$file
$line
methodprotectedloadSuiteClass( ) : void

methodpublicrun(  $suite ) : void

Run a test

Parameters
Name Type Description
$suite
methodprotectedrunFailed( string $message ) : void

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

Parameters
Name Type Description
$message string
methodpublicsetCodecoverage(  $codecoverage ) : void

Parameters
Name Type Description
$codecoverage
methodpublicsetUseCustomErrorHandler(  $useCustomErrorHandler ) : void

Parameters
Name Type Description
$useCustomErrorHandler
methodpublicstartTest( \PHPUnit_Framework_Test $test ) : void

A test started.

Parameters
Name Type Description
$test \PHPUnit_Framework_Test
methodpublicstartTestSuite( \PHPUnit_Framework_TestSuite $suite ) : void

A test suite started.

Parameters
Name Type Description
$suite \PHPUnit_Framework_TestSuite
Details
Since
Method available since Release 2.2.0  
methodpublictestEnded( string $testName ) : void

A test ended.

Parameters
Name Type Description
$testName string
methodpublictestFailed( integer $status, \PHPUnit_Framework_Test $test, \PHPUnit_Framework_AssertionFailedError $e ) : void

A test failed.

Parameters
Name Type Description
$status integer
$test \PHPUnit_Framework_Test
$e \PHPUnit_Framework_AssertionFailedError
methodpublictestStarted( string $testName ) : void

A test started.

Parameters
Name Type Description
$testName string
Documentation was generated by DocBlox 0.17.1.