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

XHTMLTestRunner Class Reference

This test runner generates the report in XHTML. More...

Inheritance diagram for XHTMLTestRunner:
XMLTestRunnerWithStyleSheet XMLTestRunner TestRunner TestSuiteResult

Public Member Functions

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

Detailed Description

This test runner generates the report in XHTML.

The class defines a XSLT style sheet and then uses XMLTestRunnerWithStyleSheet to generate the XML report and apply the style sheet.

Definition at line 45 of file xhtml_test_runner.php.

Constructor & Destructor Documentation

__construct ( )

Sets up the style sheet to convert XML to XHTML

Reimplemented from XMLTestRunnerWithStyleSheet.

Definition at line 50 of file xhtml_test_runner.php.

Member Function Documentation

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

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

[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 'html'
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 XMLTestRunner.

Definition at line 624 of file xhtml_test_runner.php.

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

© 2011, Ed Heal