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

Public Member Functions

 __construct ()
 expectException ($expected=false, $message= '%s')
 isExpected ($test, $exception)
 getOutstanding ()
 clear ()

Detailed Description

Definition at line 137 of file exceptions.php.


Constructor & Destructor Documentation

Clears down the queue ready for action.

Definition at line 144 of file exceptions.php.

Here is the call graph for this function:


Member Function Documentation

clear ( )

Discards the contents of the error queue.

Definition at line 193 of file exceptions.php.

Here is the caller graph for this function:

expectException ( expected = false,
message = '%s' 
)

Sets up an expectation of an exception. This has the effect of intercepting an exception that matches.

Parameters:
SimpleExpectation$expectedExpected exception to match.
string$messageMessage to display. public

Definition at line 156 of file exceptions.php.

Here is the call graph for this function:

Tests for any left over exception.

Returns:
string/false The failure message or false if none.

Definition at line 186 of file exceptions.php.

isExpected ( test,
exception 
)

Compares the expected exception with any in the queue. Issues a pass or fail and returns the state of the test.

Parameters:
SimpleTestCase$testTest case to send messages to.
Exception$exceptionException to compare.
Returns:
boolean False on no match.

Definition at line 175 of file exceptions.php.


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