◆ allOf()
| static Prophecy\Argument::allOf |
( |
| ) |
|
|
static |
Checks that argument matches all tokens
- Parameters
-
| mixed | ... a list of tokens |
- Returns
- Token\LogicalAndToken
◆ any()
| static Prophecy\Argument::any |
( |
| ) |
|
|
static |
Matches any single value.
- Returns
- Token\AnyValueToken
◆ approximate()
| static Prophecy\Argument::approximate |
( |
|
$value, |
|
|
|
$precision = 0 |
|
) |
| |
|
static |
Check that argument is same value when rounding to the given precision.
- Parameters
-
| float | $value | |
| float | $precision | |
- Returns
- Token\ApproximateValueToken
◆ cetera()
| static Prophecy\Argument::cetera |
( |
| ) |
|
|
static |
Matches all values to the rest of the signature.
- Returns
- Token\AnyValuesToken
◆ containing()
| static Prophecy\Argument::containing |
( |
|
$value | ) |
|
|
static |
Checks that argument array contains value
- Parameters
-
- Returns
- Token\ArrayEntryToken
◆ containingString()
| static Prophecy\Argument::containingString |
( |
|
$value | ) |
|
|
static |
- Parameters
-
- Returns
- Token\StringContainsToken
◆ exact()
| static Prophecy\Argument::exact |
( |
|
$value | ) |
|
|
static |
Checks that argument is exact value or object.
- Parameters
-
- Returns
- Token\ExactValueToken
◆ is()
| static Prophecy\Argument::is |
( |
|
$value | ) |
|
|
static |
Checks that argument is identical value.
- Parameters
-
- Returns
- Token\IdenticalValueToken
◆ not()
| static Prophecy\Argument::not |
( |
|
$value | ) |
|
|
static |
Checks that argument does not match the value|token.
- Parameters
-
| mixed | $value | either exact value or argument token |
- Returns
- Token\LogicalNotToken
◆ size()
| static Prophecy\Argument::size |
( |
|
$value | ) |
|
|
static |
Checks that argument array or countable object has exact number of elements.
- Parameters
-
| integer | $value | array elements count |
- Returns
- Token\ArrayCountToken
◆ that()
| static Prophecy\Argument::that |
( |
|
$callback | ) |
|
|
static |
Checks that argument matches provided callback.
- Parameters
-
- Returns
- Token\CallbackToken
◆ type()
| static Prophecy\Argument::type |
( |
|
$type | ) |
|
|
static |
Checks that argument is of specific type or instance of specific class.
- Parameters
-
| string | $type | Type name (integer, string) or full class name |
- Returns
- Token\TypeToken
◆ which()
| static Prophecy\Argument::which |
( |
|
$methodName, |
|
|
|
$value |
|
) |
| |
|
static |
Checks that argument object has specific state.
- Parameters
-
| string | $methodName | |
| mixed | $value | |
- Returns
- Token\ObjectStateToken
◆ withEntry()
| static Prophecy\Argument::withEntry |
( |
|
$key, |
|
|
|
$value |
|
) |
| |
|
static |
Checks that argument array contains (key, value) pair
- Parameters
-
| mixed | $key | exact value or token |
| mixed | $value | exact value or token |
- Returns
- Token\ArrayEntryToken
◆ withEveryEntry()
| static Prophecy\Argument::withEveryEntry |
( |
|
$value | ) |
|
|
static |
Checks that arguments array entries all match value
- Parameters
-
- Returns
- Token\ArrayEveryEntryToken
◆ withKey()
| static Prophecy\Argument::withKey |
( |
|
$key | ) |
|
|
static |
Checks that argument array has key
- Parameters
-
| mixed | $key | exact value or token |
- Returns
- Token\ArrayEntryToken
The documentation for this class was generated from the following file:
- vendor/phpspec/prophecy/src/Prophecy/Argument.php