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.
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!