Codeception / Codeception/module-doctrine
Entity Manager instance
- 主要语言
- PHP
- 星标
- 4
- 派生
- 2
- PR 合并指标
- 30 天内没有已合并 PR
描述
Is it normal behavior, that in two methods of one Test appearing new copy of entity manager?
I added this line in haveFakeRepository right after getting entity manager:
`codecept_debug(sprintf('VVV%s', spl_object_id($em)));`
And here is the result in one Cest:
```
LoaderJobsCest: Service points event
Signature: Orderadmin\DeliveryServices\LoaderJobsCest:servicePointsEvent
Test: codeception/Functional/LoaderJobsCest.php:servicePointsEvent
Scenario --
I have fake repository "Orderadmin\DeliveryServices\Entity\Event\Job",{"find":"Closure"}
VVV7649
I override service factory "Orderadmin\DeliveryServices\Service\LoaderService","Closure"
I grab service from container "Orderadmin\DeliveryServices\Service\Events"
I assert not equals "pending","handling","Job was started"
PASSED
LoaderJobsCest: Service points job
Signature: Orderadmin\DeliveryServices\LoaderJobsCest:servicePointsJob
Test: codeception/Functional/LoaderJobsCest.php:servicePointsJob
Scenario --
I have fake repository "Orderadmin\DeliveryServices\Entity\ServicePoint",{"findOneBy":"Closure"}
VVV4265
```
Application itself have this one - 7649 and in second method there is a new copy of entity manager.
贡献指南
这个仓库没有索引到贡献指南
调研方向
从 haveFakeRepository 开始,比较 codeception/Functional/LoaderJobsCest.php 中 servicePointsEvent 和 servicePointsJob 场景报告的 entity-manager 实例。跟踪两个方法之间应用程序容器和服务工厂是如何设置的。完成的标准是确定新实例是否符合预期,并据此记录或修正该行为。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- php
- 领域
- testing
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 35/100