Lines Matching refs:Argument

222 $user->setName(new Prophecy\Argument\Token\ExactValueToken('everzet'));
226 `Prophecy\Argument\Token\TokenInterface` and tell Prophecy how to compare real arguments
228 shortcut class `Prophecy\Argument`, which you can use to create tokens like that:
231 use Prophecy\Argument;
233 $user->setName(Argument::exact('everzet'));
239 - `IdenticalValueToken` or `Argument::is($value)` - checks that the argument is identical to a spec…
240 - `ExactValueToken` or `Argument::exact($value)` - checks that the argument matches a specific value
241 - `TypeToken` or `Argument::type($typeOrClass)` - checks that the argument matches a specific type …
243 - `ObjectStateToken` or `Argument::which($method, $value)` - checks that the argument method returns
245 - `CallbackToken` or `Argument::that(callback)` - checks that the argument matches a custom callback
246 - `AnyValueToken` or `Argument::any()` - matches any argument
247 - `AnyValuesToken` or `Argument::cetera()` - matches any arguments to the rest of the signature
248 - `StringContainsToken` or `Argument::containingString($value)` - checks that the argument contains…
255 use Prophecy\Argument;
260 $user->setName(Argument::type('string'))->will(function ($args) {
265 $user->setName(Argument::type('string'))->will(function ($args, $user) {
270 $user->setName(Argument::type('string'))->will(function ($args) use ($user) {
282 use Prophecy\Argument;
287 $user->setName(Argument::type('string'))->will(function ($args) {
292 $user->setName(Argument::type('string'))->will(function ($args, $user) {
297 $user->setName(Argument::type('string'))->will(function ($args) use ($user) {
301 $user->setName(Argument::any())->will(function () {
308 promise that has the highest score. In this case, `Argument::type()` in case of success
309 scores `5` and `Argument::any()` scores `3`. So the type token wins, as does the first