file-fetcher
Public Member Functions | List of all members
PHPUnit\Framework\MockObject\Builder\ParametersMatch Interface Reference
Inheritance diagram for PHPUnit\Framework\MockObject\Builder\ParametersMatch:
PHPUnit\Framework\MockObject\Builder\Match PHPUnit\Framework\MockObject\Builder\Stub PHPUnit\Framework\MockObject\Builder\Identity PHPUnit\Framework\MockObject\Builder\MethodNameMatch PHPUnit\Framework\MockObject\Builder\InvocationMocker

Public Member Functions

 with (... $arguments)
 
 withAnyParameters ()
 
- Public Member Functions inherited from PHPUnit\Framework\MockObject\Builder\Match
 after ($id)
 
- Public Member Functions inherited from PHPUnit\Framework\MockObject\Builder\Stub
 will (BaseStub $stub)
 
- Public Member Functions inherited from PHPUnit\Framework\MockObject\Builder\Identity
 id ($id)
 

Member Function Documentation

◆ with()

PHPUnit\Framework\MockObject\Builder\ParametersMatch::with (   $arguments)

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: // 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));

Returns
ParametersMatch

Implemented in PHPUnit\Framework\MockObject\Builder\InvocationMocker.

◆ withAnyParameters()

PHPUnit\Framework\MockObject\Builder\ParametersMatch::withAnyParameters ( )

Sets a rule which allows any kind of parameters.

Some examples: // match any number of parameters $b->withAnyParameters();

Returns
ParametersMatch

Implemented in PHPUnit\Framework\MockObject\Builder\InvocationMocker.


The documentation for this interface was generated from the following file: