Mercurial > hg > isophonics-drupal-site
comparison vendor/phpunit/phpunit-mock-objects/src/Matcher/Invocation.php @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:46:53 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
13:5fb285c0d0e3 | 14:1fec387a4317 |
---|---|
1 <?php | |
2 /* | |
3 * This file is part of the phpunit-mock-objects 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 namespace PHPUnit\Framework\MockObject\Matcher; | |
11 | |
12 use PHPUnit\Framework\MockObject\Invocation as BaseInvocation; | |
13 use PHPUnit\Framework\MockObject\Verifiable; | |
14 use PHPUnit\Framework\SelfDescribing; | |
15 | |
16 /** | |
17 * Interface for classes which matches an invocation based on its | |
18 * method name, argument, order or call count. | |
19 */ | |
20 interface Invocation extends SelfDescribing, Verifiable | |
21 { | |
22 /** | |
23 * Registers the invocation $invocation in the object as being invoked. | |
24 * This will only occur after matches() returns true which means the | |
25 * current invocation is the correct one. | |
26 * | |
27 * The matcher can store information from the invocation which can later | |
28 * be checked in verify(), or it can check the values directly and throw | |
29 * and exception if an expectation is not met. | |
30 * | |
31 * If the matcher is a stub it will also have a return value. | |
32 * | |
33 * @param BaseInvocation $invocation Object containing information on a mocked or stubbed method which was invoked | |
34 * | |
35 * @return mixed | |
36 */ | |
37 public function invoked(BaseInvocation $invocation); | |
38 | |
39 /** | |
40 * Checks if the invocation $invocation matches the current rules. If it does | |
41 * the matcher will get the invoked() method called which should check if an | |
42 * expectation is met. | |
43 * | |
44 * @param BaseInvocation $invocation Object containing information on a mocked or stubbed method which was invoked | |
45 * | |
46 * @return bool | |
47 */ | |
48 public function matches(BaseInvocation $invocation); | |
49 } |