Codeception / Codeception/module-doctrine

Entity Manager instance

オープン
#8 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
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 インスタンスを比較します。2 つのメソッド間で、アプリケーションコンテナとサービスファクトリがどのように設定されているかを追跡します。新しいインスタンスが想定されたものかどうかを確認し、それに応じて動作を文書化または修正できれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
php
領域
testing
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。