-
Notifications
You must be signed in to change notification settings - Fork 246
Description
I'm trying to migrate from Phake, and one feature I can't find a replacement for is Phake::inOrder().
The basic idea being that unless method calls happen in a specific order, the assertion fails. I had a look into writing my own prediction, but they seem to be tied to a specific method, and this type of assertion potentially spans multiple methods, or even objects.
I'm not really a huge fan of the way Phake handles this anyway. Phake::inOrder() will ignore other method calls in between the ones you specify, which is not always desirable. Sometimes you want to verify that an exact set of calls were made, and no others.
A really good example of some call order verification tools is Sinon.JS's spy API and spy call API. Amongst other features they support things like:
spy.firstCallspy.secondCallspy.thirdCallspy.lastCallspy.calledBefore(anotherSpy)spy.calledAfter(anotherSpy)spyCall = spy.getCall(n)
Is there any existing feature that helps with this kind of verification? Or would such features be worth making a PR?