VerifyInvoke on static method calls to non-static methods
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
Direzione di ricerca
La issue non nomina alcun file, test o punto di ingresso. Inizia riproducendo VerifyInvoke e le sue varianti VerifyInvoked, VerifyInvokedOnce e VerifyInvokedMultipleTimes con una chiamata statica a un metodo non statico; il lavoro è completato quando i conteggi delle invocazioni vengono verificati in modo coerente oppure il comportamento viene documentato come intenzionale.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- PHP
- Stelle
- 784
- Fork
- 132
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Codeception/AspectMock
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
Codeception/AspectMock#208 · 2 commenti · 5 reazioni ·
-
AspectMock не мокает объект Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
Codeception/AspectMock#206 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
Codeception/AspectMock#203 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 35/100
Codeception/AspectMock#202 · 5 commenti · 2 reazioni ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
Codeception/AspectMock#201 · 1 commento ·
Tutte le issue di Codeception/AspectMock
Issue simili
-
Solved site promotion gate fails on runner PHP patch drift (expects 8.2.33, runner installs 8.2.34) Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Automattic/blocks-engine#2161 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
Automattic/static-site-importer#1824 ·
-
[Chore] Keep one viget-block-generator skill and replicate it, instead of four tracked copies Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Cannot reset column width Aperta0. Needs triage bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
0. Needs triage 35-feedback bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100