Codeception / Codeception/AspectMock
Cannot verify parent method invocation
未关闭
- 主要语言
- PHP
- 星标
- 784
- 派生
- 132
- PR 合并指标
- 30 天内没有已合并 PR
描述
It seems like method invocation via `verifyInvoked*()` only works on double instances but not for `parent::` method calls. Example:
``` php
class ParentClass {
public function hello() {
echo 'Hello';
}
}
class ChildClass extends ParentClass {
public function hello() {
parent::hello();
echo ' World';
}
}
test::double(ParentClass::class, ['hello']);
$c = new ChildClass();
$c->hello();
```
How would one verify that `ParentClass::hello` was invoked?
贡献指南
这个仓库没有索引到贡献指南
调研方向
首先复现 ParentClass 和 ChildClass 示例,然后跟踪 verifyInvoked* 的实现及其对 parent:: 调用的处理。完成标准是能够可靠地验证 ParentClass::hello 的调用,并为报告中的示例提供覆盖。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- php
- 领域
- testing
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100