Open
Description
This will always have 0 calls on the instance if the method is a static method, in the generated code.
Use Phockito::when($obj->staticMethodName())
to create a mock (with the call inside when(....)
)
PHP allows calling static methods on the instance.
Phockito::when($obj->staticMethodName())...
is mocking the static method instead and calls will be recorded as 'instance' => "::$className"
__phockito_setMethod should check if the method of the class is static (cache the result)
And the verification should perform the same check
Metadata
Metadata
Assignees
Labels
No labels