Mercurial > hg > isophonics-drupal-site
annotate vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/ParametersMatch.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children |
rev | line source |
---|---|
Chris@0 | 1 <?php |
Chris@0 | 2 /* |
Chris@0 | 3 * This file is part of the PHPUnit_MockObject package. |
Chris@0 | 4 * |
Chris@0 | 5 * (c) Sebastian Bergmann <sebastian@phpunit.de> |
Chris@0 | 6 * |
Chris@0 | 7 * For the full copyright and license information, please view the LICENSE |
Chris@0 | 8 * file that was distributed with this source code. |
Chris@0 | 9 */ |
Chris@0 | 10 |
Chris@0 | 11 /** |
Chris@0 | 12 * Builder interface for parameter matchers. |
Chris@0 | 13 * |
Chris@0 | 14 * @since Interface available since Release 1.0.0 |
Chris@0 | 15 */ |
Chris@0 | 16 interface PHPUnit_Framework_MockObject_Builder_ParametersMatch extends PHPUnit_Framework_MockObject_Builder_Match |
Chris@0 | 17 { |
Chris@0 | 18 /** |
Chris@0 | 19 * Sets the parameters to match for, each parameter to this funtion will |
Chris@0 | 20 * be part of match. To perform specific matches or constraints create a |
Chris@0 | 21 * new PHPUnit_Framework_Constraint and use it for the parameter. |
Chris@0 | 22 * If the parameter value is not a constraint it will use the |
Chris@0 | 23 * PHPUnit_Framework_Constraint_IsEqual for the value. |
Chris@0 | 24 * |
Chris@0 | 25 * Some examples: |
Chris@0 | 26 * <code> |
Chris@0 | 27 * // match first parameter with value 2 |
Chris@0 | 28 * $b->with(2); |
Chris@0 | 29 * // match first parameter with value 'smock' and second identical to 42 |
Chris@0 | 30 * $b->with('smock', new PHPUnit_Framework_Constraint_IsEqual(42)); |
Chris@0 | 31 * </code> |
Chris@0 | 32 * |
Chris@0 | 33 * @return PHPUnit_Framework_MockObject_Builder_ParametersMatch |
Chris@0 | 34 */ |
Chris@0 | 35 public function with(); |
Chris@0 | 36 |
Chris@0 | 37 /** |
Chris@0 | 38 * Sets a matcher which allows any kind of parameters. |
Chris@0 | 39 * |
Chris@0 | 40 * Some examples: |
Chris@0 | 41 * <code> |
Chris@0 | 42 * // match any number of parameters |
Chris@0 | 43 * $b->withAnyParamers(); |
Chris@0 | 44 * </code> |
Chris@0 | 45 * |
Chris@0 | 46 * @return PHPUnit_Framework_MockObject_Matcher_AnyParameters |
Chris@0 | 47 */ |
Chris@0 | 48 public function withAnyParameters(); |
Chris@0 | 49 } |