ExceptionExpectation Class Reference

Inheritance diagram for ExceptionExpectation:
[legend]
Collaboration diagram for ExceptionExpectation:
[legend]

List of all members.


Public Member Functions

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

Protected Member Functions

 describeException ($exception)

Private Attributes

 $expected


Detailed Description

Definition at line 47 of file exceptions.php.


Constructor & Destructor Documentation

ExceptionExpectation::__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 $expected A class name or an actual exception to compare with.
string $message Message to display.

Definition at line 62 of file exceptions.php.

References $expected.


Member Function Documentation

ExceptionExpectation::test ( compare  ) 

Carry out the test.

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

Reimplemented from SimpleExpectation.

Definition at line 72 of file exceptions.php.

ExceptionExpectation::testMessage ( compare  ) 

Create the message to display describing the test.

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

Reimplemented from SimpleExpectation.

Definition at line 87 of file exceptions.php.

References describeException().

Here is the call graph for this function:

ExceptionExpectation::describeException ( exception  )  [protected]

Summary of an Exception object.

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

Definition at line 99 of file exceptions.php.

Referenced by testMessage().


Member Data Documentation

ExceptionExpectation::$expected [private]

Definition at line 48 of file exceptions.php.

Referenced by __construct().


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

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