1<?php
2/*
3 * This file is part of the PHPUnit_MockObject package.
4 *
5 * (c) Sebastian Bergmann <sebastian@phpunit.de>
6 *
7 * For the full copyright and license information, please view the LICENSE
8 * file that was distributed with this source code.
9 */
10
11/**
12 * Invocation matcher which does not care about previous state from earlier
13 * invocations.
14 *
15 * This abstract class can be implemented by matchers which does not care about
16 * state but only the current run-time value of the invocation itself.
17 *
18 * @since Class available since Release 1.0.0
19 * @abstract
20 */
21abstract class PHPUnit_Framework_MockObject_Matcher_StatelessInvocation implements PHPUnit_Framework_MockObject_Matcher_Invocation
22{
23    /**
24     * Registers the invocation $invocation in the object as being invoked.
25     * This will only occur after matches() returns true which means the
26     * current invocation is the correct one.
27     *
28     * The matcher can store information from the invocation which can later
29     * be checked in verify(), or it can check the values directly and throw
30     * and exception if an expectation is not met.
31     *
32     * If the matcher is a stub it will also have a return value.
33     *
34     * @param PHPUnit_Framework_MockObject_Invocation $invocation Object containing information on a mocked or stubbed method which was invoked
35     *
36     * @return mixed
37     */
38    public function invoked(PHPUnit_Framework_MockObject_Invocation $invocation)
39    {
40    }
41
42    /**
43     * Checks if the invocation $invocation matches the current rules. If it does
44     * the matcher will get the invoked() method called which should check if an
45     * expectation is met.
46     *
47     * @param PHPUnit_Framework_MockObject_Invocation $invocation Object containing information on a mocked or stubbed method which was invoked
48     *
49     * @return bool
50     */
51    public function verify()
52    {
53    }
54}
55