Moodle  2.2.1
http://www.collinsharper.com
WebUnitReporter Class Reference
Inheritance diagram for WebUnitReporter:
Collaboration diagram for WebUnitReporter:

Public Member Functions

 WebUnitReporter ($path='../ui/')
 paintHeader ($test_name)
 _getCss ()
 paintFooter ($test_name)
 paintFormattedMessage ($message)
 paintGroupStart ($test_name, $size)
 paintCaseStart ($test_name)
 paintMethodStart ($test_name)
 paintMethodEnd ($test_name)
 paintFail ($message)
 paintException ($message)
 outputScript ($script)
 toJsString ($str, $preserveCr=false)

Static Public Member Functions

 sendNoCacheHeaders ()

Data Fields

 $path

Detailed Description

Definition at line 78 of file webunit_reporter.php.


Member Function Documentation

_getCss ( )

Paints the CSS. Add additional styles here.

Returns:
string CSS code as text. protected

Definition at line 138 of file webunit_reporter.php.

outputScript ( script)

Returns the script passed in wrapped in script tags.

Parameters:
string$scriptthe script to output
Returns:
string the script wrapped with script tags

Definition at line 263 of file webunit_reporter.php.

Here is the caller graph for this function:

paintCaseStart ( test_name)

Paints the start of a test case. Will also paint the page header and footer if this is the first test. Will stash the size if the first start.

Parameters:
string$test_nameName of test that is starting. public

Reimplemented from SimpleReporter.

Definition at line 198 of file webunit_reporter.php.

paintException ( message)

Paints a PHP error or exception.

Parameters:
string$messageMessage is ignored. public

Reimplemented from SimpleScorer.

Definition at line 247 of file webunit_reporter.php.

Here is the call graph for this function:

paintFail ( message)

Paints the test failure with a breadcrumbs trail of the nesting test suites below the top level test.

Parameters:
string$messageFailure message displayed in the context of the other tests. public

Reimplemented from SimpleScorer.

Definition at line 231 of file webunit_reporter.php.

Here is the call graph for this function:

paintFooter ( test_name)

Paints the end of the test with a summary of the passes and failures.

Parameters:
string$test_nameName class of test. public

Reimplemented from SimpleReporter.

Definition at line 148 of file webunit_reporter.php.

Here is the call graph for this function:

paintFormattedMessage ( message)

Paints formatted text such as dumped variables.

Parameters:
string$messageText to show. public

Reimplemented from SimpleScorer.

Definition at line 172 of file webunit_reporter.php.

paintGroupStart ( test_name,
size 
)

Paints the start of a group test. Will also paint the page header and footer if this is the first test. Will stash the size if the first start.

Parameters:
string$test_nameName of test that is starting.
integer$sizeNumber of test cases starting. public

Reimplemented from SimpleReporter.

Definition at line 185 of file webunit_reporter.php.

paintHeader ( test_name)

Paints the top of the web page setting the title to the name of the starting test.

Parameters:
string$test_nameName class of test. public

Reimplemented from SimpleReporter.

Definition at line 103 of file webunit_reporter.php.

Here is the call graph for this function:

paintMethodEnd ( test_name)

Paints the end of a test method.

Parameters:
string$test_nameName of test that is ending. public

Reimplemented from SimpleReporter.

Definition at line 219 of file webunit_reporter.php.

paintMethodStart ( test_name)

Paints the start of a test method.

Parameters:
string$test_nameName of test that is starting. public

Reimplemented from SimpleReporter.

Definition at line 209 of file webunit_reporter.php.

sendNoCacheHeaders ( ) [static]

Send the headers necessary to ensure the page is reloaded on every request. Otherwise you could be scratching your head over out of date test data. public

Definition at line 125 of file webunit_reporter.php.

Here is the caller graph for this function:

toJsString ( str,
preserveCr = false 
)

Transform a string into a format acceptable to JavaScript

Parameters:
string$strthe string to transform
Returns:
string

Definition at line 274 of file webunit_reporter.php.

Here is the caller graph for this function:

WebUnitReporter ( path = '../ui/')

Does nothing yet. The first output will be sent on the first test start. For use by a web browser. public

Definition at line 92 of file webunit_reporter.php.

Here is the call graph for this function:


Field Documentation

$path

Definition at line 84 of file webunit_reporter.php.


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