AspectMock icon indicating copy to clipboard operation
AspectMock copied to clipboard

VerifyInvoke on static method calls to non-static methods

Open llibdude opened this issue 9 years ago • 0 comments

Static methods were introduced in PHP5, but we were allowed to make static calls to non-static methods with the '::' operator and call them as if they were static.

In my scenario, I have code I need to test where it makes a static call to a non-static method. AspectMock seems to behave as I would expect, I can mock the methods and give them return values and it's fine. My problem comes when I need to verify a method is invoked.

It is my observation that verifyInvoked (verifyInvokedOnce, verifyInvokedMultipleTimes) do not seem to keep count of the invocations when there is this kind of mismatch.

Is this intentional or is it a bug/feature request?

Thanks

llibdude avatar Aug 19 '15 16:08 llibdude