-
Notifications
You must be signed in to change notification settings - Fork 45
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
Specifying an entity manager when using the loadFixtures method #85
Comments
You can use 3rd and 4th parameters of I thought that it was documented but it looks like it's not. |
Thanks for the quick feedback. This is the way I'm currently trying with those parameters, and with the orm config above:
The message I get is: Am I doing something obviously wrong here? |
Can you please try with |
So if I do that I get this, slightly different message:
Thanks. |
Did you change the order of the parameters? You have |
No, I definitely didn't switch parameters - just changed the third parameter from 'shared' to 'shared_database'. I am not passing the 4th param as it defaults to 'doctrine' anyways. I agree the messages look strange, which is what threw me off initially (and prompted me to seek help here) |
Your code looks valid. We need a test with several |
Is your feature request related to a problem? Please describe.
Hi team, I have two different bundles in my app and each one has their own entity manager. I am writing an integration test for a service in one of the bundles, but I need to load a fixture class from the second bundle. Is this currently possible?
Describe alternatives you've considered
I tried passing in the name of the entity manager for the fixture I'd like to load, in the
$omName
parameter of theloadFixtures
method unsuccessfully. This was the main exception I kept getting:InvalidArgumentException: Doctrine ORM Manager named "shared" does not exist.
I also tried different variations of the entity manager name but same outcome, eg:
"shared", "doctrine.orm.shared_entity_manager" and "shared_entity_manager":
Additional context
Here is part of my doctrine orm config with the two entity managers for more context:
Thanks,
-Aleks
The text was updated successfully, but these errors were encountered: