PHPUnit2
[ class tree: PHPUnit2 ] [ index: PHPUnit2 ] [ all elements ]

Class: PHPUnit2_Framework_TestResult

Source Location: /PHPUnit2-2.3.6/Framework/TestResult.php

Class Overview


A TestResult collects the results of executing a test case.


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2002-2006 Sebastian Bergmann <sb@sebastian-bergmann.de>

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 68]
A TestResult collects the results of executing a test case.


[ Top ]


Class Variables

$codeCoverageInformation = array()

[line 105]

Code Coverage information provided by Xdebug.
  • Access: protected

Type:   array


[ Top ]

$collectCodeCoverageInformation =  FALSE

[line 111]

  • Access: protected

Type:   boolean


[ Top ]

$errors = array()

[line 73]

  • Access: protected

Type:   array


[ Top ]

$failures = array()

[line 79]

  • Access: protected

Type:   array


[ Top ]

$listeners = array()

[line 91]

  • Access: protected

Type:   array


[ Top ]

$notImplemented = array()

[line 85]

  • Access: protected

Type:   array


[ Top ]

$runTests =  0

[line 97]

  • Access: protected

Type:   integer


[ Top ]



Method Detail

addError   [line 151]

void addError( PHPUnit2_Framework_Test $test, Exception $e)

Adds an error to the list of errors.

The passed in exception caused the error.

  • Access: public

Parameters:

PHPUnit2_Framework_Test   $test   — 
Exception   $e   — 

[ Top ]

addFailure   [line 175]

void addFailure( PHPUnit2_Framework_Test $test, PHPUnit2_Framework_AssertionFailedError $e)

Adds a failure to the list of failures.

The passed in exception caused the failure.

  • Access: public

Parameters:


[ Top ]

addListener   [line 125]

void addListener( PHPUnit2_Framework_TestListener $listener)

Registers a TestListener.
  • Access: public

Parameters:

PHPUnit2_Framework_TestListener   $listener   — 

[ Top ]

allCompletlyImplemented   [line 249]

boolean allCompletlyImplemented( )

Returns TRUE if no incomplete test occured.
  • Access: public

[ Top ]

collectCodeCoverageInformation   [line 321]

void collectCodeCoverageInformation( boolean $flag)

Enables or disables the collection of Code Coverage information.
  • Throws: Exception
  • Since: Method available since Release 2.3.0
  • Access: public

Parameters:

boolean   $flag   — 

[ Top ]

endTest   [line 237]

void endTest( PHPUnit2_Framework_Test $test)

Informs the result that a test was completed.
  • Access: public

Parameters:

PHPUnit2_Framework_Test   $test   — 

[ Top ]

endTestSuite   [line 211]

void endTestSuite( PHPUnit2_Framework_TestSuite $suite)

Informs the result that a testsuite was completed.
  • Since: Method available since Release 2.2.0
  • Access: public

Parameters:

PHPUnit2_Framework_TestSuite   $suite   — 

[ Top ]

errorCount   [line 279]

integer errorCount( )

Gets the number of detected errors.
  • Access: public

[ Top ]

errors   [line 289]

array errors( )

Returns an Enumeration for the errors.
  • Access: public

[ Top ]

failureCount   [line 299]

integer failureCount( )

Gets the number of detected failures.
  • Access: public

[ Top ]

failures   [line 309]

array failures( )

Returns an Enumeration for the failures.
  • Access: public

[ Top ]

getCodeCoverageInformation   [line 350]

array getCodeCoverageInformation( )

Returns Code Coverage data per test case.

Format of the result array:

  1.  array(
  2.    "testCase" => array(
  3.      "/tested/code.php" => array(
  4.        linenumber => flag
  5.      )
  6.    )
  7.  )

flag < 0: Line is executable but was not executed. flag > 0: Line was executed.

  • Access: public

[ Top ]

notImplemented   [line 269]

array notImplemented( )

Returns an Enumeration for the incomplete tests.
  • Access: public

[ Top ]

notImplementedCount   [line 259]

integer notImplementedCount( )

Gets the number of incomplete tests.
  • Access: public

[ Top ]

removeListener   [line 135]

void removeListener( PHPUnit2_Framework_TestListener $listener)

Unregisters a TestListener.
  • Access: public

Parameters:

PHPUnit2_Framework_TestListener   $listener   — 

[ Top ]

run   [line 360]

void run( PHPUnit2_Framework_Test $test)

Runs a TestCase.
  • Access: public

Parameters:

PHPUnit2_Framework_Test   $test   — 

[ Top ]

runCount   [line 406]

integer runCount( )

Gets the number of run tests.
  • Access: public

[ Top ]

shouldStop   [line 416]

boolean shouldStop( )

Checks whether the test run should stop.
  • Access: public

[ Top ]

startTest   [line 223]

void startTest( PHPUnit2_Framework_Test $test)

Informs the result that a test will be started.
  • Access: public

Parameters:

PHPUnit2_Framework_Test   $test   — 

[ Top ]

startTestSuite   [line 198]

void startTestSuite( PHPUnit2_Framework_TestSuite $suite)

Informs the result that a testsuite will be started.
  • Since: Method available since Release 2.2.0
  • Access: public

Parameters:

PHPUnit2_Framework_TestSuite   $suite   — 

[ Top ]

stop   [line 425]

void stop( )

Marks that the test run should stop.
  • Access: public

[ Top ]

wasSuccessful   [line 435]

boolean wasSuccessful( )

Returns whether the entire test was successful or not.
  • Access: public

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:40:19 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.