Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php declare(strict_types=1);
2
/*
3
 * This file is part of PHPUnit.
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
/**
13
 * @internal This class is not covered by the backward compatibility promise for PHPUnit
14
 */
15
interface ParametersMatch extends Stub
16
{
17
    /**
18
     * Defines the expectation which must occur before the current is valid.
19
     *
20
     * @param string $id the identification of the expectation that should
21
     *                   occur before this one
22
     *
23
     * @return Stub
24
     */
25
    public function after($id);
26
 
27
    /**
28
     * Sets the parameters to match for, each parameter to this function will
29
     * be part of match. To perform specific matches or constraints create a
30
     * new PHPUnit\Framework\Constraint\Constraint and use it for the parameter.
31
     * If the parameter value is not a constraint it will use the
32
     * PHPUnit\Framework\Constraint\IsEqual for the value.
33
     *
34
     * Some examples:
35
     * <code>
36
     * // match first parameter with value 2
37
     * $b->with(2);
38
     * // match first parameter with value 'smock' and second identical to 42
39
     * $b->with('smock', new PHPUnit\Framework\Constraint\IsEqual(42));
40
     * </code>
41
     *
42
     * @return ParametersMatch
43
     */
44
    public function with(...$arguments);
45
 
46
    /**
47
     * Sets a rule which allows any kind of parameters.
48
     *
49
     * Some examples:
50
     * <code>
51
     * // match any number of parameters
52
     * $b->withAnyParameters();
53
     * </code>
54
     *
55
     * @return ParametersMatch
56
     */
57
    public function withAnyParameters();
58
}