SimpleExceptionTrap Class Reference

List of all members.


Public Member Functions

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

Private Attributes

 $expected
 $message


Detailed Description

Definition at line 111 of file exceptions.php.


Constructor & Destructor Documentation

SimpleExceptionTrap::__construct (  ) 

Clears down the queue ready for action.

Definition at line 118 of file exceptions.php.

References clear().

Here is the call graph for this function:


Member Function Documentation

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

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

Parameters:
SimpleExpectation $expected Expected exception to match.
string $message Message to display. public

Definition at line 130 of file exceptions.php.

References $expected, $message, and SimpleExpectation::isExpectation().

Here is the call graph for this function:

SimpleExceptionTrap::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 $test Test case to send messages to.
Exception $exception Exception to compare.
Returns:
boolean False on no match.

Definition at line 149 of file exceptions.php.

SimpleExceptionTrap::getOutstanding (  ) 

Tests for any left over exception.

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

Definition at line 160 of file exceptions.php.

SimpleExceptionTrap::clear (  ) 

Discards the contents of the error queue.

Definition at line 167 of file exceptions.php.

Referenced by __construct().


Member Data Documentation

SimpleExceptionTrap::$expected [private]

Definition at line 112 of file exceptions.php.

Referenced by expectException().

SimpleExceptionTrap::$message [private]

Definition at line 113 of file exceptions.php.

Referenced by expectException().


The documentation for this class was generated from the following file:

Generated on Mon Jun 2 15:09:11 2008 for SimpleTest by  1.5.5