test: add test with multiple ORM schemas#629
Conversation
abcae96 to
c3a0265
Compare
kbond
left a comment
There was a problem hiding this comment.
This looks great, thanks for working on this Vincent!
Regarding the failing CI (I'm not familiar with multiple schemas). Do you know what's going on there?
tests/bootstrap.php
Outdated
| $fs->remove(__DIR__.'/Fixture/Migrations'); | ||
| $fs->mkdir(__DIR__.'/Fixture/Migrations'); | ||
|
|
||
| // restore custom migrations |
There was a problem hiding this comment.
Can we use Symfony\Component\Filesystem\Filesystem to just copy the entire directory?
There was a problem hiding this comment.
Filesystem only allows to copy files, not directories
There was a problem hiding this comment.
Filesystem::mirror() should do the trick (but this isn't a big deal)
|
Hi @kbond,
The This PR is still in WIP till I find a clean solution to test this specific use case. |
c3a0265 to
294a381
Compare
294a381 to
2755bbc
Compare
|
I'm wondering if a simpler solution would not be to declare two entity managers, affect one entity to this entity manager, and configure the test kernel to not reset this specific EM. WDYT? |
I'm afraid using multiple entity managers won't solve the original issue. The idea is to add non-regression tests to ensure the database is fully and properly removed before running the migrations (cf. #615). The idea here is to have a custom migration which should fail the tests if not run properly (for instance, if |
|
ok thanks for explanations, I understand better now! |
Fixes #618