PHP Unit Testing Framework 1
A Unit testing framework for PHP.
Public Member Functions

XMLTestRunner Class Reference

Test runner to generate XML reports. More...

Inheritance diagram for XMLTestRunner:
TestRunner TestSuiteResult XMLTestRunnerWithStyleSheet TextTestRunner XHTMLTestRunner

Public Member Functions

 Report ()
 Run (TestSuite &$suite, $filename=null, $extension= 'xml')

Detailed Description

Test runner to generate XML reports.

This test runner generates the report in XML.

If you want to apply a style sheet to the output, subclass XMLTestRunnerWithStyleSheet. The following two classes:

Todo:
Create a schema (XSD) for future developers.

Definition at line 51 of file xml_test_runner.php.


Member Function Documentation

Report ( )

Generates the report in XML.

Reimplemented from TestRunner.

Reimplemented in XMLTestRunnerWithStyleSheet.

Definition at line 56 of file xml_test_runner.php.

Run ( TestSuite &$  suite,
filename = null,
extension = 'xml' 
)

Runs all the test cases in the $suite, with the option of storing the results in a file.

Parameters:
[in]TestSuite&$suiteThe suite of tests to run.
[in]string$filenameFilename is either:

  • null - stdout is used;
  • '' - A temporary filename is used, with the filename written to stdout;
  • any other string - The given filename is used.
[in]string$extensionThe extension to use for the file. Defaults to 'xml'
Returns:
Returns one of the following values:
  • 0 - All tests passed;
  • -1 - One or more tests failed;
  • -2 - Unable to open file;
  • -3 - Unable to write to file.

Reimplemented from TestRunner.

Reimplemented in TextTestRunner, and XHTMLTestRunner.

Definition at line 177 of file xml_test_runner.php.


The documentation for this class was generated from the following file:
 All Data Structures Files Functions Variables

© 2011, Ed Heal