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
Propertyprivate  $excludeGroups= 'array()'
Default valuearray()Details
Type
Propertyprivate  $formatters= 'array()'
Default valuearray()Details
Type
Propertyprivate  $groups= 'array()'
Default valuearray()Details
Type
Propertyprivate  $lastErrorMessage= ''''
Default value''Details
Type
Propertyprivate  $lastFailureMessage= ''''
Default value''Details
Type
Propertyprivate  $lastIncompleteMessage= ''''
Default value''Details
Type
Propertyprivate  $lastSkippedMessage= ''''
Default value''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 ) : 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
inherited

Inherited from: \PHPUnit_Runner_BaseTestRunner::clearStatus()
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
inherited

Inherited from: \PHPUnit_Runner_BaseTestRunner::getLoader()
methodpublicgetRetCode( ) : void

methodpublicgetTest( ) : void
inherited

Inherited from: \PHPUnit_Runner_BaseTestRunner::getTest()
methodpublichandleError(  $level,  $message,  $file,  $line ) : void

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

Inherited from: \PHPUnit_Runner_BaseTestRunner::loadSuiteClass()
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.15.1.