PHP Class PHPUnit_Util_Log_JUnit, phpunit

The XML markup used is the same as the one that is used by the JUnit Ant task.
Inheritance: extends PHPUnit_Util_Printer, implements PHPUnit_Framework_TestListener
Mostra file Open project: sebastianbergmann/phpunit Class Usage Examples

Protected Properties

Property Type Description
$currentTestCase DOMElement
$document DOMDocument
$reportUselessTests boolean
$root DOMElement
$testSuiteAssertions int[]
$testSuiteErrors int[]
$testSuiteFailures int[]
$testSuiteLevel integer
$testSuiteSkipped int[]
$testSuiteTests int[]
$testSuiteTimes int[]
$testSuites DOMElement[]
$writeDocument boolean

Public Methods

Method Description
__construct ( mixed $out = null, boolean $reportUselessTests = false ) Constructor.
addError ( PHPUnit_Framework_Test $test, Exception $e, float $time ) An error occurred.
addFailure ( PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, float $time ) A failure occurred.
addIncompleteTest ( PHPUnit_Framework_Test $test, Exception $e, float $time ) Incomplete test.
addRiskyTest ( PHPUnit_Framework_Test $test, Exception $e, float $time ) Risky test.
addSkippedTest ( PHPUnit_Framework_Test $test, Exception $e, float $time ) Skipped test.
addWarning ( PHPUnit_Framework_Test $test, PHPUnit_Framework_Warning $e, float $time ) A warning occurred.
endTest ( PHPUnit_Framework_Test $test, float $time ) A test ended.
endTestSuite ( PHPUnit_Framework_TestSuite $suite ) A testsuite ended.
flush ( ) Flush buffer and close output.
getXML ( ) : string Returns the XML as a string.
setWriteDocument ( $flag ) : string Enables or disables the writing of the document in flush().
startTest ( PHPUnit_Framework_Test $test ) A test started.
startTestSuite ( PHPUnit_Framework_TestSuite $suite ) A testsuite started.

Private Methods

Method Description
doAddFault ( PHPUnit_Framework_Test $test, Exception $e, float $time, string $type ) Method which generalizes addError() and addFailure()
doAddSkipped ( PHPUnit_Framework_Test $test )

Method Details

__construct() public method

Constructor.
public __construct ( mixed $out = null, boolean $reportUselessTests = false )
$out mixed
$reportUselessTests boolean

addError() public method

An error occurred.
public addError ( PHPUnit_Framework_Test $test, Exception $e, float $time )
$test PHPUnit_Framework_Test
$e Exception
$time float

addFailure() public method

A failure occurred.
public addFailure ( PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, float $time )
$test PHPUnit_Framework_Test
$e PHPUnit_Framework_AssertionFailedError
$time float

addIncompleteTest() public method

Incomplete test.
public addIncompleteTest ( PHPUnit_Framework_Test $test, Exception $e, float $time )
$test PHPUnit_Framework_Test
$e Exception
$time float

addRiskyTest() public method

Risky test.
public addRiskyTest ( PHPUnit_Framework_Test $test, Exception $e, float $time )
$test PHPUnit_Framework_Test
$e Exception
$time float

addSkippedTest() public method

Skipped test.
public addSkippedTest ( PHPUnit_Framework_Test $test, Exception $e, float $time )
$test PHPUnit_Framework_Test
$e Exception
$time float

addWarning() public method

A warning occurred.
public addWarning ( PHPUnit_Framework_Test $test, PHPUnit_Framework_Warning $e, float $time )
$test PHPUnit_Framework_Test
$e PHPUnit_Framework_Warning
$time float

endTest() public method

A test ended.
public endTest ( PHPUnit_Framework_Test $test, float $time )
$test PHPUnit_Framework_Test
$time float

endTestSuite() public method

A testsuite ended.
public endTestSuite ( PHPUnit_Framework_TestSuite $suite )
$suite PHPUnit_Framework_TestSuite

flush() public method

Flush buffer and close output.
public flush ( )

getXML() public method

Returns the XML as a string.
public getXML ( ) : string
return string

setWriteDocument() public method

This is a "hack" needed for the integration of PHPUnit with Phing.
public setWriteDocument ( $flag ) : string
return string

startTest() public method

A test started.
public startTest ( PHPUnit_Framework_Test $test )
$test PHPUnit_Framework_Test

startTestSuite() public method

A testsuite started.
public startTestSuite ( PHPUnit_Framework_TestSuite $suite )
$suite PHPUnit_Framework_TestSuite

Property Details

$currentTestCase protected_oe property

protected DOMElement $currentTestCase
return DOMElement

$document protected_oe property

protected DOMDocument $document
return DOMDocument

$reportUselessTests protected_oe property

protected bool $reportUselessTests
return boolean

$root protected_oe property

protected DOMElement $root
return DOMElement

$testSuiteAssertions protected_oe property

protected int[] $testSuiteAssertions
return int[]

$testSuiteErrors protected_oe property

protected int[] $testSuiteErrors
return int[]

$testSuiteFailures protected_oe property

protected int[] $testSuiteFailures
return int[]

$testSuiteLevel protected_oe property

protected int $testSuiteLevel
return integer

$testSuiteSkipped protected_oe property

protected int[] $testSuiteSkipped
return int[]

$testSuiteTests protected_oe property

protected int[] $testSuiteTests
return int[]

$testSuiteTimes protected_oe property

protected int[] $testSuiteTimes
return int[]

$testSuites protected_oe property

protected DOMElement[] $testSuites
return DOMElement[]

$writeDocument protected_oe property

protected bool $writeDocument
return boolean