Pull merge.
[yaffs-website] / vendor / phpunit / phpunit-mock-objects / src / Framework / MockObject / Matcher / StatelessInvocation.php
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  */
21 abstract 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
35      *                                                             Object containing information on a mocked or stubbed method which
36      *                                                             was invoked.
37      * @return mixed
38      */
39     public function invoked(PHPUnit_Framework_MockObject_Invocation $invocation)
40     {
41     }
42
43     /**
44      * Checks if the invocation $invocation matches the current rules. If it does
45      * the matcher will get the invoked() method called which should check if an
46      * expectation is met.
47      *
48      * @param  PHPUnit_Framework_MockObject_Invocation $invocation
49      *                                                             Object containing information on a mocked or stubbed method which
50      *                                                             was invoked.
51      * @return bool
52      */
53     public function verify()
54     {
55     }
56 }