comparison vendor/phpunit/phpunit-mock-objects/src/Builder/ParametersMatch.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\Builder;
11
12 use PHPUnit\Framework\MockObject\Matcher\AnyParameters;
13
14 /**
15 * Builder interface for parameter matchers.
16 */
17 interface ParametersMatch extends Match
18 {
19 /**
20 * Sets the parameters to match for, each parameter to this function will
21 * be part of match. To perform specific matches or constraints create a
22 * new PHPUnit\Framework\Constraint\Constraint and use it for the parameter.
23 * If the parameter value is not a constraint it will use the
24 * PHPUnit\Framework\Constraint\IsEqual for the value.
25 *
26 * Some examples:
27 * <code>
28 * // match first parameter with value 2
29 * $b->with(2);
30 * // match first parameter with value 'smock' and second identical to 42
31 * $b->with('smock', new PHPUnit\Framework\Constraint\IsEqual(42));
32 * </code>
33 *
34 * @return ParametersMatch
35 */
36 public function with(...$arguments);
37
38 /**
39 * Sets a matcher which allows any kind of parameters.
40 *
41 * Some examples:
42 * <code>
43 * // match any number of parameters
44 * $b->withAnyParameters();
45 * </code>
46 *
47 * @return AnyParameters
48 */
49 public function withAnyParameters();
50 }