phpspec/prophecy — pull request #128 by tomphp (2014-09-12 10:18:14+00:00)
Title: Add Argument::invoke() for testing callback arguments

The idea here is to cause a callback argument to a mock to be invoked so that the contents of the callback can be tests. Example:

```php
foreachItem(Argument::invoke([$item], 'success'))->willReturn();

$this->execute($collection, 10);

$item->action(10)->shouldHaveBeenCalled();
}

function execute($collection, $value)
{
$collection->foreachItem(function ($item) use ($value) {
$item->action($value);

return 'success';
});
}
```

I understand this could be controversial so I'm expecting some discussion.

Also I wasn't sure what score value to return so I just took the same as `AnyValueToken`?