An empty collection of methods that can have their
return values set and expectations made of the calls upon them. The mock will assert the expectations against it's attached test case in addition to the server stub behaviour.
Located in /libraries/pear/simpletest/mock_objects.php (line 526)
SimpleStub | --SimpleMock
Class | Description |
---|---|
![]() |
An empty collection of methods that can have their |
Inherited from SimpleStub
SimpleStub::$_call_counts
SimpleStub::$_is_strict
SimpleStub::$_returns
SimpleStub::$_return_sequence
SimpleStub::$_wildcard
Creates an empty return list and expectation list.
All call counts are set to zero.
Sets up an expected call with a set of expected parameters in that call. All calls will be compared to these expectations regardless of when the call is made.
Sets up an expected call with a set of expected parameters in that call. The expected call count will be adjusted if it is set too low to reach this call.
Convenience method for requiring a method call.
Sets an expectation for the number of times a method will be called. The tally method is used to check this.
Sets the number of times a method may be called before a test failure is triggered.
Sets the number of times to call a method to prevent a failure on the tally.
Convenience method for barring a method call.
Convenience method for a single method call.
Accessor for attached unit test so that when subclassed, new expectations can be added easily.
Totals up the call counts and triggers a test assertion if a test is present for expected call counts.
This method must be called explicitly for the call count assertions to be triggered.
Triggers an assertion on the held test case.
Should be overridden when using another test framework other than the SimpleTest one if the assertion method has a different name.
Die if bad arguments array is passed
Tests the arguments against expectations.
Returns the expected value for the method name and checks expectations. Will generate any test assertions as a result of expectations if there is a test present.
Checks that the exact call counts match up.
Checks that the minimum call counts match up.
Inherited From SimpleStub
SimpleStub::SimpleStub()
SimpleStub::clearHistory()
SimpleStub::getCallCount()
SimpleStub::setReturnReference()
SimpleStub::setReturnReferenceAt()
SimpleStub::setReturnValue()
SimpleStub::setReturnValueAt()
SimpleStub::_addCall()
SimpleStub::_dieOnNoMethod()
SimpleStub::_getReturn()
SimpleStub::_invoke()
SimpleStub::_replaceWildcards()
SimpleStub::_warnOnNoReturn()
Documentation generated on Fri, 24 Dec 2004 13:02:44 +0000 by phpDocumentor 1.3.0RC3