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: * Interface for classes which matches an invocation based on its Chris@0: * method name, argument, order or call count. Chris@0: * Chris@0: * @since Interface available since Release 1.0.0 Chris@0: */ Chris@0: interface PHPUnit_Framework_MockObject_Matcher_Invocation extends PHPUnit_Framework_SelfDescribing, PHPUnit_Framework_MockObject_Verifiable 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: * 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 matches(PHPUnit_Framework_MockObject_Invocation $invocation); Chris@0: }