interface ParametersMatch
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
@internal This class is not covered by the backward compatibility promise for PHPUnit
Hierarchy
- interface \PHPUnit\Framework\MockObject\Builder\Identity
- interface \PHPUnit\Framework\MockObject\Builder\Stub extends \PHPUnit\Framework\MockObject\Builder\Identity
- interface \PHPUnit\Framework\MockObject\Builder\ParametersMatch extends \PHPUnit\Framework\MockObject\Builder\Stub
- interface \PHPUnit\Framework\MockObject\Builder\Stub extends \PHPUnit\Framework\MockObject\Builder\Identity
Expanded class hierarchy of ParametersMatch
All classes that implement ParametersMatch
File
-
vendor/
phpunit/ phpunit/ src/ Framework/ MockObject/ Runtime/ Builder/ ParametersMatch.php, line 17
Namespace
PHPUnit\Framework\MockObject\BuilderView source
interface ParametersMatch extends Stub {
/**
* Defines the expectation which must occur before the current is valid.
*/
public function after(string $id) : Stub;
/**
* Sets the parameters to match for, each parameter to this function will
* be part of match. To perform specific matches or constraints create a
* new PHPUnit\Framework\Constraint\Constraint and use it for the parameter.
* If the parameter value is not a constraint it will use the
* PHPUnit\Framework\Constraint\IsEqual for the value.
*
* Some examples:
* <code>
* // match first parameter with value 2
* $b->with(2);
* // match first parameter with value 'smock' and second identical to 42
* $b->with('smock', new PHPUnit\Framework\Constraint\IsEqual(42));
* </code>
*/
public function with(mixed ...$arguments) : self;
/**
* Sets a rule which allows any kind of parameters.
*
* Some examples:
* <code>
* // match any number of parameters
* $b->withAnyParameters();
* </code>
*/
public function withAnyParameters() : self;
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overrides |
---|---|---|---|---|
Identity::id | public | function | Sets the identification of the expectation to $id. | 1 |
ParametersMatch::after | public | function | Defines the expectation which must occur before the current is valid. | 1 |
ParametersMatch::with | public | function | Sets the parameters to match for, each parameter to this function will be part of match. To perform specific matches or constraints create a new PHPUnit\Framework\Constraint\Constraint and use it for the parameter. If the parameter value is not a… |
1 |
ParametersMatch::withAnyParameters | public | function | Sets a rule which allows any kind of parameters. | 1 |
Stub::will | public | function | Stubs the matching method with the stub object $stub. Any invocations of the matched method will now be handled by the stub instead. |