Pull merge.
[yaffs-website] / vendor / phpunit / phpunit-mock-objects / src / Framework / MockObject / Invokable.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  * Interface for classes which can be invoked.
13  *
14  * The invocation will be taken from a mock object and passed to an object
15  * of this class.
16  *
17  * @since Interface available since Release 1.0.0
18  */
19 interface PHPUnit_Framework_MockObject_Invokable extends PHPUnit_Framework_MockObject_Verifiable
20 {
21     /**
22      * Invokes the invocation object $invocation so that it can be checked for
23      * expectations or matched against stubs.
24      *
25      * @param  PHPUnit_Framework_MockObject_Invocation $invocation
26      *                                                             The invocation object passed from mock object.
27      * @return object
28      */
29     public function invoke(PHPUnit_Framework_MockObject_Invocation $invocation);
30
31     /**
32      * Checks if the invocation matches.
33      *
34      * @param  PHPUnit_Framework_MockObject_Invocation $invocation
35      *                                                             The invocation object passed from mock object.
36      * @return bool
37      */
38     public function matches(PHPUnit_Framework_MockObject_Invocation $invocation);
39 }