Public Member Functions | |
__construct () | |
expectException ($expected=false, $message= '%s') | |
isExpected ($test, $exception) | |
getOutstanding () | |
clear () | |
Private Attributes | |
$expected | |
$message |
Definition at line 111 of file exceptions.php.
SimpleExceptionTrap::__construct | ( | ) |
Clears down the queue ready for action.
Definition at line 118 of file exceptions.php.
References clear().
SimpleExceptionTrap::expectException | ( | $ | expected = false , |
|
$ | message = '%s' | |||
) |
Sets up an expectation of an exception. This has the effect of intercepting an exception that matches.
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().
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.
SimpleTestCase | $test Test case to send messages to. | |
Exception | $exception Exception to compare. |
Definition at line 149 of file exceptions.php.
SimpleExceptionTrap::getOutstanding | ( | ) |
Tests for any left over exception.
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().
SimpleExceptionTrap::$expected [private] |
SimpleExceptionTrap::$message [private] |