| [ Index ] |
PHP Cross Reference of Limb3 |
[Source view] [Print] [Project Stats]
base include file for SimpleTest
| Version: | $Id: expectation.php 5999 2007-06-18 13:13:08Z pachanga $ |
| File Size: | 895 lines (31 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
SimpleExpectation:: (6 methods):
SimpleExpectation()
test()
testMessage()
overlayMessage()
_getDumper()
isExpectation()
AnythingExpectation:: (2 methods):
test()
testMessage()
FailedExpectation:: (2 methods):
test()
testMessage()
TrueExpectation:: (2 methods):
test()
testMessage()
FalseExpectation:: (2 methods):
test()
testMessage()
EqualExpectation:: (4 methods):
EqualExpectation()
test()
testMessage()
_getValue()
NotEqualExpectation:: (3 methods):
NotEqualExpectation()
test()
testMessage()
WithinMarginExpectation:: (5 methods):
WithinMarginExpectation()
test()
testMessage()
_withinMessage()
_outsideMessage()
OutsideMarginExpectation:: (3 methods):
OutsideMarginExpectation()
test()
testMessage()
ReferenceExpectation:: (4 methods):
ReferenceExpectation()
test()
testMessage()
_getValue()
IdenticalExpectation:: (3 methods):
IdenticalExpectation()
test()
testMessage()
NotIdenticalExpectation:: (3 methods):
NotIdenticalExpectation()
test()
testMessage()
PatternExpectation:: (5 methods):
PatternExpectation()
_getPattern()
test()
testMessage()
_describePatternMatch()
WantedPatternExpectation:: (0 methods):
NoPatternExpectation:: (3 methods):
NoPatternExpectation()
test()
testMessage()
UnwantedPatternExpectation:: (0 methods):
IsAExpectation:: (5 methods):
IsAExpectation()
_getType()
test()
_canonicalType()
testMessage()
NotAExpectation:: (3 methods):
NotAExpectation()
test()
testMessage()
MethodExistsExpectation:: (3 methods):
MethodExistsExpectation()
test()
testMessage()
Class: SimpleExpectation - X-Ref
Assertion that can display failure information.| SimpleExpectation($message = '%s') X-Ref |
| Creates a dumper for displaying values and sets the test message. param: string $message Customised message on failure. |
| test($compare) X-Ref |
| Tests the expectation. True if correct. param: mixed $compare Comparison value. return: boolean True if correct. |
| testMessage($compare) X-Ref |
| Returns a human readable test message. param: mixed $compare Comparison value. return: string Description of success |
| overlayMessage($compare, $dumper) X-Ref |
| Overlays the generated message onto the stored user message. An additional message can be interjected. param: mixed $compare Comparison value. param: SimpleDumper $dumper For formatting the results. return: string Description of success |
| _getDumper() X-Ref |
| Accessor for the dumper. return: SimpleDumper Current value dumper. |
| isExpectation($expectation) X-Ref |
| Test to see if a value is an expectation object. A useful utility method. param: mixed $expectation Hopefully an Epectation return: boolean True if descended from |
Class: EqualExpectation - X-Ref
Test for equality.| EqualExpectation($value, $message = '%s') X-Ref |
| Sets the value to compare against. param: mixed $value Test value to match. param: string $message Customised message on failure. |
| test($compare) X-Ref |
| Tests the expectation. True if it matches the held value. param: mixed $compare Comparison value. return: boolean True if correct. |
| testMessage($compare) X-Ref |
| Returns a human readable test message. param: mixed $compare Comparison value. return: string Description of success |
| _getValue() X-Ref |
| Accessor for comparison value. return: mixed Held value to compare with. |
Class: NotEqualExpectation - X-Ref
Test for inequality.| NotEqualExpectation($value, $message = '%s') X-Ref |
| Sets the value to compare against. param: mixed $value Test value to match. param: string $message Customised message on failure. |
| test($compare) X-Ref |
| Tests the expectation. True if it differs from the held value. param: mixed $compare Comparison value. return: boolean True if correct. |
| testMessage($compare) X-Ref |
| Returns a human readable test message. param: mixed $compare Comparison value. return: string Description of success |
Class: WithinMarginExpectation - X-Ref
Test for being within a range.| WithinMarginExpectation($value, $margin, $message = '%s') X-Ref |
| Sets the value to compare against and the fuzziness of the match. Used for comparing floating point values. param: mixed $value Test value to match. param: mixed $margin Fuzziness of match. param: string $message Customised message on failure. |
| test($compare) X-Ref |
| Tests the expectation. True if it matches the held value. param: mixed $compare Comparison value. return: boolean True if correct. |
| testMessage($compare) X-Ref |
| Returns a human readable test message. param: mixed $compare Comparison value. return: string Description of success |
| _withinMessage($compare) X-Ref |
| Creates a the message for being within the range. param: mixed $compare Value being tested. |
| _outsideMessage($compare) X-Ref |
| Creates a the message for being within the range. param: mixed $compare Value being tested. |
Class: OutsideMarginExpectation - X-Ref
Test for being outside of a range.| OutsideMarginExpectation($value, $margin, $message = '%s') X-Ref |
| Sets the value to compare against and the fuzziness of the match. Used for comparing floating point values. param: mixed $value Test value to not match. param: mixed $margin Fuzziness of match. param: string $message Customised message on failure. |
| test($compare) X-Ref |
| Tests the expectation. True if it matches the held value. param: mixed $compare Comparison value. return: boolean True if correct. |
| testMessage($compare) X-Ref |
| Returns a human readable test message. param: mixed $compare Comparison value. return: string Description of success |
Class: ReferenceExpectation - X-Ref
Test for reference.| ReferenceExpectation(&$value, $message = '%s') X-Ref |
| Sets the reference value to compare against. param: mixed $value Test reference to match. param: string $message Customised message on failure. |
| test(&$compare) X-Ref |
| Tests the expectation. True if it exactly references the held value. param: mixed $compare Comparison reference. return: boolean True if correct. |
| testMessage($compare) X-Ref |
| Returns a human readable test message. param: mixed $compare Comparison value. return: string Description of success |
| _getValue() X-Ref |
| No description |
Class: IdenticalExpectation - X-Ref
Test for identity.| IdenticalExpectation($value, $message = '%s') X-Ref |
| Sets the value to compare against. param: mixed $value Test value to match. param: string $message Customised message on failure. |
| test($compare) X-Ref |
| Tests the expectation. True if it exactly matches the held value. param: mixed $compare Comparison value. return: boolean True if correct. |
| testMessage($compare) X-Ref |
| Returns a human readable test message. param: mixed $compare Comparison value. return: string Description of success |
Class: NotIdenticalExpectation - X-Ref
Test for non-identity.| NotIdenticalExpectation($value, $message = '%s') X-Ref |
| Sets the value to compare against. param: mixed $value Test value to match. param: string $message Customised message on failure. |
| test($compare) X-Ref |
| Tests the expectation. True if it differs from the held value. param: mixed $compare Comparison value. return: boolean True if correct. |
| testMessage($compare) X-Ref |
| Returns a human readable test message. param: mixed $compare Comparison value. return: string Description of success |
Class: PatternExpectation - X-Ref
Test for a pattern using Perl regex rules.| PatternExpectation($pattern, $message = '%s') X-Ref |
| Sets the value to compare against. param: string $pattern Pattern to search for. param: string $message Customised message on failure. |
| _getPattern() X-Ref |
| Accessor for the pattern. return: string Perl regex as string. |
| test($compare) X-Ref |
| Tests the expectation. True if the Perl regex matches the comparison value. param: string $compare Comparison value. return: boolean True if correct. |
| testMessage($compare) X-Ref |
| Returns a human readable test message. param: mixed $compare Comparison value. return: string Description of success |
| _describePatternMatch($pattern, $subject) X-Ref |
| Describes a pattern match including the string found and it's position. param: string $pattern Regex to match against. param: string $subject Subject to search. |
Class: WantedPatternExpectation - X-Ref
Class: NoPatternExpectation - X-Ref
Fail if a pattern is detected within the| NoPatternExpectation($pattern, $message = '%s') X-Ref |
| Sets the reject pattern param: string $pattern Pattern to search for. param: string $message Customised message on failure. |
| test($compare) X-Ref |
| Tests the expectation. False if the Perl regex matches the comparison value. param: string $compare Comparison value. return: boolean True if correct. |
| testMessage($compare) X-Ref |
| Returns a human readable test message. param: string $compare Comparison value. return: string Description of success |
Class: UnwantedPatternExpectation - X-Ref
Class: IsAExpectation - X-Ref
Tests either type or class name if it's an object.| IsAExpectation($type, $message = '%s') X-Ref |
| Sets the type to compare with. param: string $type Type or class name. param: string $message Customised message on failure. |
| _getType() X-Ref |
| Accessor for type to check against. return: string Type or class name. |
| test($compare) X-Ref |
| Tests the expectation. True if the type or class matches the string value. param: string $compare Comparison value. return: boolean True if correct. |
| _canonicalType($type) X-Ref |
| Coerces type name into a gettype() match. param: string $type User type. return: string Simpler type. |
| testMessage($compare) X-Ref |
| Returns a human readable test message. param: mixed $compare Comparison value. return: string Description of success |
Class: NotAExpectation - X-Ref
Tests either type or class name if it's an object.| NotAExpectation($type, $message = '%s') X-Ref |
| Sets the type to compare with. param: string $type Type or class name. param: string $message Customised message on failure. |
| test($compare) X-Ref |
| Tests the expectation. False if the type or class matches the string value. param: string $compare Comparison value. return: boolean True if different. |
| testMessage($compare) X-Ref |
| Returns a human readable test message. param: mixed $compare Comparison value. return: string Description of success |
Class: MethodExistsExpectation - X-Ref
Tests for existance of a method in an object| MethodExistsExpectation($method, $message = '%s') X-Ref |
| Sets the value to compare against. param: string $method Method to check. param: string $message Customised message on failure. return: void |
| test($compare) X-Ref |
| Tests the expectation. True if the method exists in the test object. param: string $compare Comparison method name. return: boolean True if correct. |
| testMessage($compare) X-Ref |
| Returns a human readable test message. param: mixed $compare Comparison value. return: string Description of success |
| Generated: Sat Nov 22 03:48:54 2008 | Cross-referenced by PHPXref 0.7 |