|
From: Marcus B. <ma...@la...> - 2004-02-06 23:36:06
|
Hi...
Jason Sweat wrote:
> Would it be reasonable to automatically wrap the third argument in an array, if
> it is not an array, to avoid this error?
I thought about this, but could not come to a final conclusion and so
went with simplicity. The problem with overloaded arguments is that you
have more stuff to explain in the documentation and more things to
figure out in use. At least this way it always behaves the same way...
$mock->expectArguments('method', $login->getPermissions());
What if the method sometimes returns false and sometimes an array? Not a
likely scenario, but you kind of see what I mean. If I were going to go
that way I should have used the func_get_args() to have them flat.
Perhaps I should have done that :(.
yours, Marcus
--
Marcus Baker, ma...@la..., no...@ap...
|