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

Public Member Functions

 SimpleExpectation ($message= '%s')
 test ($compare)
 testMessage ($compare)
 overlayMessage ($compare, $dumper)
_getDumper ()

Static Public Member Functions

 isExpectation ($expectation)

Data Fields

 $_dumper = false
 $_message

Detailed Description

Definition at line 23 of file expectation.php.


Member Function Documentation

& _getDumper ( )

Accessor for the dumper.

Returns:
SimpleDumper Current value dumper. protected

Definition at line 76 of file expectation.php.

Here is the caller graph for this function:

isExpectation ( expectation) [static]

Test to see if a value is an expectation object. A useful utility method.

Parameters:
mixed$expectationHopefully an Epectation class.
Returns:
boolean True if descended from this class. public

Definition at line 94 of file expectation.php.

Here is the call graph for this function:

Here is the caller graph for this function:

overlayMessage ( compare,
dumper 
)

Overlays the generated message onto the stored user message. An additional message can be interjected.

Parameters:
mixed$compareComparison value.
SimpleDumper$dumperFor formatting the results.
Returns:
string Description of success or failure. public

Definition at line 66 of file expectation.php.

Here is the call graph for this function:

SimpleExpectation ( message = '%s')

Creates a dumper for displaying values and sets the test message.

Parameters:
string$messageCustomised message on failure.

Definition at line 32 of file expectation.php.

Here is the caller graph for this function:


Field Documentation

$_dumper = false

Definition at line 24 of file expectation.php.

$_message

Definition at line 25 of file expectation.php.


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