Codeception / Codeception/AspectMock

VerifyInvoke on static method calls to non-static methods

Offen
#65 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
PHP
Sterne
784
Forks
132
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.