Codeception / Codeception/AspectMock
VerifyInvoke on static method calls to non-static methods
- 主要语言
- PHP
- 星标
- 784
- 派生
- 132
- PR 合并指标
- 30 天内没有已合并 PR
描述
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
贡献指南
这个仓库没有索引到贡献指南
调研方向
issue 中没有指定文件、测试或入口点。首先,使用对非静态方法的静态调用重现 VerifyInvoke 及其 VerifyInvoked、VerifyInvokedOnce 和 VerifyInvokedMultipleTimes 变体;当调用次数得到一致验证,或该行为被记录为有意设计时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- php
- 领域
- testing
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100