3 * This file is part of the PHPUnit_MockObject package.
5 * (c) Sebastian Bergmann <sebastian@phpunit.de>
7 * For the full copyright and license information, please view the LICENSE
8 * file that was distributed with this source code.
12 * Interface for classes which matches an invocation based on its
13 * method name, argument, order or call count.
15 * @since Interface available since Release 1.0.0
17 interface PHPUnit_Framework_MockObject_Matcher_Invocation extends PHPUnit_Framework_SelfDescribing, PHPUnit_Framework_MockObject_Verifiable
20 * Registers the invocation $invocation in the object as being invoked.
21 * This will only occur after matches() returns true which means the
22 * current invocation is the correct one.
24 * The matcher can store information from the invocation which can later
25 * be checked in verify(), or it can check the values directly and throw
26 * and exception if an expectation is not met.
28 * If the matcher is a stub it will also have a return value.
30 * @param PHPUnit_Framework_MockObject_Invocation $invocation
31 * Object containing information on a mocked or stubbed method which
35 public function invoked(PHPUnit_Framework_MockObject_Invocation $invocation);
38 * Checks if the invocation $invocation matches the current rules. If it does
39 * the matcher will get the invoked() method called which should check if an
42 * @param PHPUnit_Framework_MockObject_Invocation $invocation
43 * Object containing information on a mocked or stubbed method which
47 public function matches(PHPUnit_Framework_MockObject_Invocation $invocation);