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

Persistent ReferenceRepository to be used in tests #466

Open
mkrauser opened this issue Jan 31, 2024 · 0 comments
Open

Persistent ReferenceRepository to be used in tests #466

mkrauser opened this issue Jan 31, 2024 · 0 comments

Comments

@mkrauser
Copy link

Hey,

in the past my each test I wrote, loaded the fixtures (or part of it) before executing. Then I used the ReferenceRepository to get references to objects required in the tests.

Now we load all fixtures while bootstrapping the tests and after each test we rollback the database transaction. But that way we don't have access to the ReferenceRepository.

I had an idea regarding this:
When loading the fixtures, it should be possible to serialize the information from the ReferenceRepository to a file, which can then be used to reconstruct the ReferenceRepository later.
This would potentially reduce the Overhead-Code in Tests dramatically.

Thank you for your work on doctrine!

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