You are here

public function PHPUnit_Framework_MockObject_Builder_ParametersMatch::with in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/ParametersMatch.php \PHPUnit_Framework_MockObject_Builder_ParametersMatch::with()

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 PHPUnit_Framework_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>

Return value

PHPUnit_Framework_MockObject_Builder_ParametersMatch

1 method overrides PHPUnit_Framework_MockObject_Builder_ParametersMatch::with()
PHPUnit_Framework_MockObject_Builder_InvocationMocker::with in vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/InvocationMocker.php

File

vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/ParametersMatch.php, line 35

Class

PHPUnit_Framework_MockObject_Builder_ParametersMatch
Builder interface for parameter matchers.

Code

public function with();