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

Public Member Functions

 __construct ($expected, $message= '%s')
 test ($compare)
 testMessage ($compare)

Protected Member Functions

 describeException ($exception)

Detailed Description

Definition at line 70 of file exceptions.php.


Constructor & Destructor Documentation

__construct ( expected,
message = '%s' 
)

Sets up the conditions to test against. If the expected value is a string, then it will act as a test of the class name. An exception as the comparison will trigger an identical match. Writing this down now makes it look doubly dumb. I hope come up with a better scheme later.

Parameters:
mixed$expectedA class name or an actual exception to compare with.
string$messageMessage to display.

Definition at line 85 of file exceptions.php.


Member Function Documentation

describeException ( exception) [protected]

Summary of an Exception object.

Parameters:
Exception$compareException to describe.
Returns:
string Text description.

Definition at line 125 of file exceptions.php.

Here is the caller graph for this function:

test ( compare)

Carry out the test.

Parameters:
Exception$compareValue to check.
Returns:
boolean True if matched.

Reimplemented from SimpleExpectation.

Definition at line 95 of file exceptions.php.

testMessage ( compare)

Create the message to display describing the test.

Parameters:
Exception$compareException to match.
Returns:
string Final message.

Reimplemented from SimpleExpectation.

Definition at line 110 of file exceptions.php.

Here is the call graph for this function:


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