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

Class: PHPUnit2_Framework_TestResult

Source Location: /PHPUnit2-3.0.0alpha11/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>

Methods


Inherited Variables

Inherited Methods


Class Details

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


[ Top ]


Method Detail

addError   [line 186]

void addError( mixed PHPUnit2_Framework_Test$test, mixed Exception$e, 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 221]

void addFailure( mixed PHPUnit2_Framework_Test$test, mixed PHPUnit2_Framework_AssertionFailedError$e, 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:

PHPUnit2_Framework_Test   $test     
PHPUnit2_Framework_AssertionFailedError   $e     

[ Top ]

addListener   [line 141]

void addListener( PHPUnit2_Framework_TestListener PHPUnit2_Framework_TestListener$listener)

Registers a TestListener.
  • Access: public

Parameters:

PHPUnit2_Framework_TestListener   PHPUnit2_Framework_TestListener$listener     

[ Top ]

allCompletlyImplemented   [line 314]

boolean allCompletlyImplemented( )

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

[ Top ]

collectCodeCoverageInformation   [line 441]

void collectCodeCoverageInformation( boolean $flag)

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

Parameters:

boolean   $flag     

[ Top ]

count   [line 548]

integer count( )

Gets the number of run tests.
  • Access: public

[ Top ]

endTest   [line 301]

void endTest( PHPUnit2_Framework_Test PHPUnit2_Framework_Test$test)

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

Parameters:

PHPUnit2_Framework_Test   PHPUnit2_Framework_Test$test     

[ Top ]

endTestSuite   [line 273]

void endTestSuite( mixed PHPUnit2_Framework_TestSuite$suite, 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 383]

integer errorCount( )

Gets the number of detected errors.
  • Access: public

[ Top ]

errors   [line 394]

array errors( )

Returns an Enumeration for the errors.
  • Access: public

[ Top ]

failureCount   [line 405]

integer failureCount( )

Gets the number of detected failures.
  • Access: public

[ Top ]

failures   [line 416]

array failures( )

Returns an Enumeration for the failures.
  • Access: public

[ Top ]

flushListeners   [line 169]

void flushListeners( )

Flushes all flushable TestListeners.
  • Since: Method available since Release 3.0.0
  • Access: public

[ Top ]

getCodeCoverageInformation   [line 476]

array getCodeCoverageInformation( [boolean $filterTests = TRUE], [boolean $filterPHPUnit = TRUE])

Returns Code Coverage data per test case.

Format of the result array:


1 array(
2 array(
3 'test' => PHPUnit2_Framework_Test
4 'files' => array(
5 "/tested/code.php" => array(
6 linenumber => flag
7 )
8 )
9 )
10 )

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

  • Access: public

Parameters:

boolean   $filterTests     
boolean   $filterPHPUnit     

[ Top ]

noneSkipped   [line 348]

boolean noneSkipped( )

Returns TRUE if no test has been skipped.
  • Since: Method available since Release 3.0.0
  • Access: public

[ Top ]

notImplemented   [line 336]

array notImplemented( )

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

[ Top ]

notImplementedCount   [line 325]

integer notImplementedCount( )

Gets the number of incomplete tests.
  • Access: public

[ Top ]

removeListener   [line 152]

void removeListener( mixed PHPUnit2_Framework_TestListener$listener, PHPUnit2_Framework_TestListener $listener)

Unregisters a TestListener.
  • Access: public

Parameters:

PHPUnit2_Framework_TestListener   $listener     

[ Top ]

run   [line 491]

void run( mixed PHPUnit2_Framework_Test$test, PHPUnit2_Framework_Test $test)

Runs a TestCase.
  • Access: public

Parameters:

PHPUnit2_Framework_Test   $test     

[ Top ]

shouldStop   [line 559]

boolean shouldStop( )

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

[ Top ]

skipped   [line 372]

array skipped( )

Returns an Enumeration for the skipped tests.
  • Since: Method available since Release 3.0.0
  • Access: public

[ Top ]

skippedCount   [line 360]

integer skippedCount( )

Gets the number of skipped tests.
  • Since: Method available since Release 3.0.0
  • Access: public

[ Top ]

startTest   [line 286]

void startTest( mixed PHPUnit2_Framework_Test$test, PHPUnit2_Framework_Test $test)

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

Parameters:

PHPUnit2_Framework_Test   $test     

[ Top ]

startTestSuite   [line 255]

void startTestSuite( mixed PHPUnit2_Framework_TestSuite$suite, 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 569]

void stop( )

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

[ Top ]

topTestSuite   [line 428]

PHPUnit2_Framework_TestSuite topTestSuite( )

Returns the (top) test suite.
  • Since: Method available since Release 3.0.0
  • Access: public

[ Top ]

wasSuccessful   [line 580]

boolean wasSuccessful( )

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

[ Top ]


Documentation generated on Tue, 12 Sep 2006 09:38:02 -0400 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.