SimpleExpectation Class Reference

Inheritance diagram for SimpleExpectation:
[legend]

List of all members.


Public Member Functions

 SimpleExpectation ($message= '%s')
 test ($compare)
 testMessage ($compare)
 overlayMessage ($compare, $dumper)
_getDumper ()

Static Public Member Functions

 isExpectation ($expectation)

Public Attributes

 $_dumper = false
 $_message


Detailed Description

Definition at line 11 of file expectation.php.


Member Function Documentation

SimpleExpectation::SimpleExpectation ( message = '%s'  ) 

Creates a dumper for displaying values and sets the test message.

Parameters:
string $message Customised message on failure.

Definition at line 20 of file expectation.php.

SimpleExpectation::test ( compare  ) 

Tests the expectation. True if correct.

Parameters:
mixed $compare Comparison value.
Returns:
boolean True if correct. public

Reimplemented in ExceptionExpectation, AnythingExpectation, and TrueExpectation.

Definition at line 31 of file expectation.php.

SimpleExpectation::testMessage ( compare  ) 

Returns a human readable test message.

Parameters:
mixed $compare Comparison value.
Returns:
string Description of success or failure. public

Reimplemented in ExceptionExpectation, AnythingExpectation, and TrueExpectation.

Definition at line 41 of file expectation.php.

Referenced by overlayMessage().

SimpleExpectation::overlayMessage ( compare,
dumper 
)

Overlays the generated message onto the stored user message. An additional message can be interjected.

Parameters:
mixed $compare Comparison value.
SimpleDumper $dumper For formatting the results.
Returns:
string Description of success or failure. public

Definition at line 52 of file expectation.php.

References testMessage().

Here is the call graph for this function:

& SimpleExpectation::_getDumper (  ) 

Accessor for the dumper.

Returns:
SimpleDumper Current value dumper. protected

Definition at line 62 of file expectation.php.

Referenced by TrueExpectation::testMessage(), and AnythingExpectation::testMessage().

SimpleExpectation::isExpectation ( expectation  )  [static]

Test to see if a value is an expectation object. A useful utility method.

Parameters:
mixed $expectation Hopefully an Epectation class.
Returns:
boolean True if descended from this class. public

Definition at line 80 of file expectation.php.

Referenced by SimpleExceptionTrap::expectException().


Member Data Documentation

SimpleExpectation::$_dumper = false

Definition at line 12 of file expectation.php.

SimpleExpectation::$_message

Definition at line 13 of file expectation.php.


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

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