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 | |
Definition at line 11 of file expectation.php.
| SimpleExpectation::SimpleExpectation | ( | $ | message = '%s' |
) |
Creates a dumper for displaying values and sets the test message.
| string | $message Customised message on failure. |
Definition at line 20 of file expectation.php.
| SimpleExpectation::test | ( | $ | compare | ) |
Tests the expectation. True if correct.
| mixed | $compare Comparison value. |
Reimplemented in ExceptionExpectation, AnythingExpectation, and TrueExpectation.
Definition at line 31 of file expectation.php.
| SimpleExpectation::testMessage | ( | $ | compare | ) |
Returns a human readable test message.
| mixed | $compare Comparison value. |
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.
| mixed | $compare Comparison value. | |
| SimpleDumper | $dumper For formatting the results. |
Definition at line 52 of file expectation.php.
References testMessage().
| & SimpleExpectation::_getDumper | ( | ) |
Accessor for the dumper.
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.
| mixed | $expectation Hopefully an Epectation class. |
Definition at line 80 of file expectation.php.
Referenced by SimpleExceptionTrap::expectException().
| SimpleExpectation::$_dumper = false |
Definition at line 12 of file expectation.php.
| SimpleExpectation::$_message |
Definition at line 13 of file expectation.php.
1.5.5