Lggr
All Classes Namespaces Functions Variables Pages
Public Member Functions | List of all members
PHPUnit\Framework\MockObject\Builder\ParametersMatch Interface Reference
Inheritance diagram for PHPUnit\Framework\MockObject\Builder\ParametersMatch:
Inheritance graph
[legend]
Collaboration diagram for PHPUnit\Framework\MockObject\Builder\ParametersMatch:
Collaboration graph
[legend]

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)
 

Detailed Description

Builder interface for parameter matchers.

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 matcher which allows any kind of parameters.

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

Returns
AnyParameters

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


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