Chris@14:
Chris@14: *
Chris@14: * For the full copyright and license information, please view the LICENSE
Chris@14: * file that was distributed with this source code.
Chris@14: */
Chris@14: namespace PHPUnit\Framework\MockObject\Builder;
Chris@14:
Chris@14: use PHPUnit\Framework\MockObject\Matcher\AnyParameters;
Chris@14:
Chris@14: /**
Chris@14: * Builder interface for parameter matchers.
Chris@14: */
Chris@14: interface ParametersMatch extends Match
Chris@14: {
Chris@14: /**
Chris@14: * Sets the parameters to match for, each parameter to this function will
Chris@14: * be part of match. To perform specific matches or constraints create a
Chris@14: * new PHPUnit\Framework\Constraint\Constraint and use it for the parameter.
Chris@14: * If the parameter value is not a constraint it will use the
Chris@14: * PHPUnit\Framework\Constraint\IsEqual for the value.
Chris@14: *
Chris@14: * Some examples:
Chris@14: *
Chris@14: * // match first parameter with value 2
Chris@14: * $b->with(2);
Chris@14: * // match first parameter with value 'smock' and second identical to 42
Chris@14: * $b->with('smock', new PHPUnit\Framework\Constraint\IsEqual(42));
Chris@14: *
Chris@14: *
Chris@14: * @return ParametersMatch
Chris@14: */
Chris@14: public function with(...$arguments);
Chris@14:
Chris@14: /**
Chris@14: * Sets a matcher which allows any kind of parameters.
Chris@14: *
Chris@14: * Some examples:
Chris@14: *
Chris@14: * // match any number of parameters
Chris@14: * $b->withAnyParameters();
Chris@14: *
Chris@14: *
Chris@14: * @return AnyParameters
Chris@14: */
Chris@14: public function withAnyParameters();
Chris@14: }