Hello!
I am trying to spy something with MockBox and can’t accomplish it as easily as I expected. I want to assert that my SUT has called a dependency and provided a specific argument. I’ve created this dependency using MockBox.createStub(); and mocked the getter methods that are called by my SUT. So far so good.
Now, I want to accomplish the confirmation that a specific argument was provided by my SUT to this dependency: MockedDependecy.setSomething(foo=“bar”);
What is the best way to test the SUT called “setSomething” and provided the arguments “foo=bar”?
I can easily assert that the “setSomething” method was called using the $count() method provided by MockBox but I have have yet to find a way to confirm the arguments of that call.
Does this functionality exist now? If not, any objections to me adding it?
If I were to add this, it would be an additional method that essentially saved the arguments provided for later assertion. Something like $spy(‘setSomething’) that would allow you to get an array of the arguments using $trace(‘setSomething’)/
Thanks for your help.
Aaron Greenlee
http://aarongreenlee.com/