class (none) \ PHPUnit_Util_Log_JUnit

All implemented interfaces:
PHPUnit_Framework_TestListener

A TestListener that generates a logfile of the test execution in XML markup.

The XML markup used is the same as the one that is used by the JUnit Ant task.


Method Summary

Name Description
__construct($out = null, $logIncompleteSkipped = false)Constructor.
addError(PHPUnit_Framework_Test $test, Exception $e, $time)An error occurred.
addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time)A failure occurred.
addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time)Incomplete test.
addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time)Risky test.
addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time)Skipped test.
endTest(PHPUnit_Framework_Test $test, $time)A test ended.
endTestSuite(PHPUnit_Framework_TestSuite $suite)A testsuite ended.
flush()Flush buffer and close output.
getXML()Returns the XML as a string.
setWriteDocument($flag)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.

Inherited Method Summary

Name Description
getAutoFlush()Check auto-flush mode. (from PHPUnit_Util_Printer)
incrementalFlush()Performs a safe, incremental flush. (from PHPUnit_Util_Printer)
setAutoFlush($autoFlush)Set auto-flushing mode. (from PHPUnit_Util_Printer)
write($buffer) (from PHPUnit_Util_Printer)

public function __construct($out = null, $logIncompleteSkipped = false)

Constructor.

Overrides:
__construct($out = null)
Parameters:
mixed - $out
boolean - $logIncompleteSkipped
Defaults:
out = null
logIncompleteSkipped = false
Throws:
PHPUnit_Framework_Exception

public function addError(PHPUnit_Framework_Test $test, Exception $e, $time)

An error occurred.

Parameters:
PHPUnit_Framework_Test - $test
Exception - $e
float - $time

public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time)

A failure occurred.

Parameters:
PHPUnit_Framework_Test - $test
PHPUnit_Framework_AssertionFailedError - $e
float - $time

public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time)

Incomplete test.

Parameters:
PHPUnit_Framework_Test - $test
Exception - $e
float - $time

public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time)

Risky test.

Parameters:
PHPUnit_Framework_Test - $test
Exception - $e
float - $time

public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time)

Skipped test.

Parameters:
PHPUnit_Framework_Test - $test
Exception - $e
float - $time

public function endTest(PHPUnit_Framework_Test $test, $time)

A test ended.

Parameters:
PHPUnit_Framework_Test - $test
float - $time

public function endTestSuite(PHPUnit_Framework_TestSuite $suite)

A testsuite ended.

Parameters:
PHPUnit_Framework_TestSuite - $suite

public function flush()

Flush buffer and close output.

Overrides:
flush()

public function getXML()

Returns the XML as a string.

Returns:
string

public function setWriteDocument($flag)

Enables or disables the writing of the document in flush().

This is a "hack" needed for the integration of PHPUnit with Phing.

Returns:
string

public function startTest(PHPUnit_Framework_Test $test)

A test started.

Parameters:
PHPUnit_Framework_Test - $test

public function startTestSuite(PHPUnit_Framework_TestSuite $suite)

A testsuite started.

Parameters:
PHPUnit_Framework_TestSuite - $suite