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
Afficher le fichier Open project: sebastianbergmann/phpunit Class Usage Examples

Protected Properties

Свойство 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

Méthodes publiques

Méthode 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

Méthode 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 méthode

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

addError() public méthode

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

addFailure() public méthode

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 méthode

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

addRiskyTest() public méthode

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

addSkippedTest() public méthode

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

addWarning() public méthode

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 méthode

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

endTestSuite() public méthode

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

flush() public méthode

Flush buffer and close output.
public flush ( )

getXML() public méthode

Returns the XML as a string.
public getXML ( ) : string
Résultat string

setWriteDocument() public méthode

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

startTest() public méthode

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

startTestSuite() public méthode

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

Property Details

$currentTestCase protected_oe property

protected DOMElement $currentTestCase
Résultat DOMElement

$document protected_oe property

protected DOMDocument $document
Résultat DOMDocument

$reportUselessTests protected_oe property

protected bool $reportUselessTests
Résultat boolean

$root protected_oe property

protected DOMElement $root
Résultat DOMElement

$testSuiteAssertions protected_oe property

protected int[] $testSuiteAssertions
Résultat int[]

$testSuiteErrors protected_oe property

protected int[] $testSuiteErrors
Résultat int[]

$testSuiteFailures protected_oe property

protected int[] $testSuiteFailures
Résultat int[]

$testSuiteLevel protected_oe property

protected int $testSuiteLevel
Résultat integer

$testSuiteSkipped protected_oe property

protected int[] $testSuiteSkipped
Résultat int[]

$testSuiteTests protected_oe property

protected int[] $testSuiteTests
Résultat int[]

$testSuiteTimes protected_oe property

protected int[] $testSuiteTimes
Résultat int[]

$testSuites protected_oe property

protected DOMElement[] $testSuites
Résultat DOMElement[]

$writeDocument protected_oe property

protected bool $writeDocument
Résultat boolean