Mockbox incorrectly mocks method signatures
Description
Gliffy Diagrams
Activity
Adam CameronFebruary 3, 2014 at 9:03 AM
That sounds fine to me. Cheers mate.

Luis MajanoJanuary 30, 2014 at 4:42 PM
Adam. We added a preserve argument that manually has to be turned to true.
We had a long discussion about this one, but the issue is that default
arguments would then be required to be generated and it was not a easy as
it sounds. Therefore we opted to be a flag that users enable and then when
mocking with $args t hey must make sure they pass all necessary arguments.
Is that clear?
On Thursday, January 30, 2014, Adam Cameron (JIRA) <
–
Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com
ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com
Social: twitter.com/lmajano facebook.com/lmajano
Adam CameronJanuary 30, 2014 at 3:25 PM
So was this actually released? I note there's not "Fix Version". And it's a problem in Mockbox 2.2 (I dunno if 2.2 predates this ticket, that said).
Adam CameronJuly 19, 2013 at 7:50 AM
Heads-up: I've D/Led the dev branch and tested this on my repro case and it seems to resolve the issue.
See http://cfmlblog.adamcameron.me/2013/07/weird-issue-with-mockbox-and-interfaces_11.html for issue description and fix.
Basically MockGenerator.cfc's generate() method does not correctly mock a method's signature.
This is not ideal for two reasons:
the method will fail nay interface contract it has
when using the mocked method, tests can give false positives if required args aren't passed