Codeception / Codeception/AspectMock

VerifyInvoke on static method calls to non-static methods

Open
#65 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
784
Forks
132
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.