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

Public Member Functions

 IsAExpectation ($type, $message= '%s')
 _getType ()
 test ($compare)
 _canonicalType ($type)
 testMessage ($compare)

Data Fields

 $_type

Detailed Description

Definition at line 733 of file expectation.php.


Member Function Documentation

_canonicalType ( type)

Coerces type name into a gettype() match.

Parameters:
string$typeUser type.
Returns:
string Simpler type. private

Definition at line 777 of file expectation.php.

Here is the caller graph for this function:

_getType ( )

Accessor for type to check against.

Returns:
string Type or class name. protected

Definition at line 752 of file expectation.php.

Here is the caller graph for this function:

IsAExpectation ( type,
message = '%s' 
)

Sets the type to compare with.

Parameters:
string$typeType or class name.
string$messageCustomised message on failure. public

Definition at line 742 of file expectation.php.

Here is the call graph for this function:

Here is the caller graph for this function:

test ( compare)

Tests the expectation. True if the type or class matches the string value.

Parameters:
string$compareComparison value.
Returns:
boolean True if correct. public

Reimplemented from SimpleExpectation.

Reimplemented in NotAExpectation.

Definition at line 763 of file expectation.php.

Here is the call graph for this function:

testMessage ( compare)

Returns a human readable test message.

Parameters:
mixed$compareComparison value.
Returns:
string Description of success or failure. public

Reimplemented from SimpleExpectation.

Reimplemented in NotAExpectation.

Definition at line 797 of file expectation.php.

Here is the call graph for this function:


Field Documentation

$_type

Reimplemented in NotAExpectation.

Definition at line 734 of file expectation.php.


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