Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entity Manager instance #8

Open
tasselchof opened this issue Feb 23, 2022 · 0 comments
Open

Entity Manager instance #8

tasselchof opened this issue Feb 23, 2022 · 0 comments

Comments

@tasselchof
Copy link

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.

@TavoNiievez TavoNiievez transferred this issue from Codeception/module-doctrine2 Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant