mlively/Phake — Issue #51: Create a new argument matcher that will match any value including a missing value.
Author: mlively
Created: 2012-01-03 22:29:03+00:00
State: open
Labels: Enhancement

Frequently, when dealing with methods that have defaulted parameters you may decided that you want to begin passing something other than the default. The problem with this and how Phake is currently implemented is that any verifications on that method immediately fail. If there was a way to have Phake not care at all about additional parameters that would help ease this brittleness.

The anyParameters() matcher is too broad in that it covers ALL arguments. PHPUnit's anything() is too narrow in that there has to be something there. There needs to be something in the middle. Either an ignore(), ignoreRest() or something like that.