Chris@14: Chris@14: * Chris@14: * For the full copyright and license information, please view the LICENSE Chris@14: * file that was distributed with this source code. Chris@14: */ Chris@14: namespace PHPUnit\Framework\MockObject; Chris@14: Chris@14: /** Chris@14: * Interface for classes which can be invoked. Chris@14: * Chris@14: * The invocation will be taken from a mock object and passed to an object Chris@14: * of this class. Chris@14: */ Chris@14: interface Invokable extends Verifiable Chris@14: { Chris@14: /** Chris@14: * Invokes the invocation object $invocation so that it can be checked for Chris@14: * expectations or matched against stubs. Chris@14: * Chris@14: * @param Invocation $invocation The invocation object passed from mock object Chris@14: * Chris@14: * @return object Chris@14: */ Chris@14: public function invoke(Invocation $invocation); Chris@14: Chris@14: /** Chris@14: * Checks if the invocation matches. Chris@14: * Chris@14: * @param Invocation $invocation The invocation object passed from mock object Chris@14: * Chris@14: * @return bool Chris@14: */ Chris@14: public function matches(Invocation $invocation); Chris@14: }