Moodle  2.2.1
http://www.collinsharper.com
SimpleTestContext Class Reference

Public Member Functions

 clear ()
 setTest (&$test)
 unsetTest ()
getTest ()
 setReporter (&$reporter)
getReporter ()

Static Public Member Functions

get ($resource)

Data Fields

 $_test
 $_reporter
 $_resources

Detailed Description

Definition at line 254 of file simpletest.php.


Member Function Documentation

clear ( )

Clears down the current context. public

Definition at line 263 of file simpletest.php.

Here is the caller graph for this function:

& get ( resource) [static]

Accessor for the Singleton resource.

Returns:
object Global resource. public

Definition at line 328 of file simpletest.php.

& getReporter ( )

Accessor for current reporter.

Returns:
SimpleReporter Current reporter. public

Definition at line 318 of file simpletest.php.

& getTest ( )

Accessor for currently running test case.

Returns:
SimpleTestCase Current test. public

Definition at line 297 of file simpletest.php.

setReporter ( &$  reporter)

Sets the current reporter. This global instance can be used by the mock objects to send messages.

Parameters:
SimpleReporter$reporterReporter to register. public

Definition at line 308 of file simpletest.php.

Here is the call graph for this function:

setTest ( &$  test)

Sets the current test case instance. This global instance can be used by the mock objects to send message to the test cases.

Parameters:
SimpleTestCase$testTest case to register. public

Definition at line 274 of file simpletest.php.

Here is the call graph for this function:

unsetTest ( )

Unsets the current test case instance. Avoids problems when test classes rely on their destructors being called at a predictable time. public

Definition at line 286 of file simpletest.php.

Here is the call graph for this function:


Field Documentation

$_reporter

Definition at line 256 of file simpletest.php.

$_resources

Definition at line 257 of file simpletest.php.

$_test

Definition at line 255 of file simpletest.php.


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