Chris@0: Chris@0: * Chris@0: * For the full copyright and license information, please view the LICENSE Chris@0: * file that was distributed with this source code. Chris@0: */ Chris@0: Chris@0: /** Chris@0: * Invocation matcher which does not care about previous state from earlier Chris@0: * invocations. Chris@0: * Chris@0: * This abstract class can be implemented by matchers which does not care about Chris@0: * state but only the current run-time value of the invocation itself. Chris@0: * Chris@0: * @since Class available since Release 1.0.0 Chris@0: * @abstract Chris@0: */ Chris@0: abstract class PHPUnit_Framework_MockObject_Matcher_StatelessInvocation implements PHPUnit_Framework_MockObject_Matcher_Invocation Chris@0: { Chris@0: /** Chris@0: * Registers the invocation $invocation in the object as being invoked. Chris@0: * This will only occur after matches() returns true which means the Chris@0: * current invocation is the correct one. Chris@0: * Chris@0: * The matcher can store information from the invocation which can later Chris@0: * be checked in verify(), or it can check the values directly and throw Chris@0: * and exception if an expectation is not met. Chris@0: * Chris@0: * If the matcher is a stub it will also have a return value. Chris@0: * Chris@0: * @param PHPUnit_Framework_MockObject_Invocation $invocation Chris@0: * Object containing information on a mocked or stubbed method which Chris@0: * was invoked. Chris@0: * @return mixed Chris@0: */ Chris@0: public function invoked(PHPUnit_Framework_MockObject_Invocation $invocation) Chris@0: { Chris@0: } Chris@0: Chris@0: /** Chris@0: * Checks if the invocation $invocation matches the current rules. If it does Chris@0: * the matcher will get the invoked() method called which should check if an Chris@0: * expectation is met. Chris@0: * Chris@0: * @param PHPUnit_Framework_MockObject_Invocation $invocation Chris@0: * Object containing information on a mocked or stubbed method which Chris@0: * was invoked. Chris@0: * @return bool Chris@0: */ Chris@0: public function verify() Chris@0: { Chris@0: } Chris@0: }