PHPUnit_Framework_MockObject_Builder_ParametersMatch
interface PHPUnit_Framework_MockObject_Builder_ParametersMatch implements PHPUnit_Framework_MockObject_Builder_Match (View source)
Builder interface for parameter matchers.
Methods
Sets the identification of the expectation to $id.
Stubs the matching method with the stub object $stub. Any invocations of the matched method will now be handled by the stub instead.
Defines the expectation which must occur before the current is valid.
Sets the parameters to match for, each parameter to this funtion will be part of match. To perform specific matches or constraints create a new PHPUnitFrameworkConstraint and use it for the parameter.
Sets a matcher which allows any kind of parameters.
Details
id(string $id)
Sets the identification of the expectation to $id.
PHPUnit_Framework_MockObject_Builder_Identity
will(PHPUnit_Framework_MockObject_Stub $stub)
Stubs the matching method with the stub object $stub. Any invocations of the matched method will now be handled by the stub instead.
PHPUnit_Framework_MockObject_Builder_Stub
after(string $id)
Defines the expectation which must occur before the current is valid.
at line 33
PHPUnit_Framework_MockObject_Builder_ParametersMatch
with($arguments)
Sets the parameters to match for, each parameter to this funtion will be part of match. To perform specific matches or constraints create a new PHPUnitFrameworkConstraint and use it for the parameter.
If the parameter value is not a constraint it will use the PHPUnitFrameworkConstraint_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 PHPUnitFrameworkConstraint_IsEqual(42));
at line 46
PHPUnit_Framework_MockObject_Matcher_AnyParameters
withAnyParameters()
Sets a matcher which allows any kind of parameters.
Some examples:
// match any number of parameters
$b->withAnyParameters();