Why not just use mysql for all tests? If you install this package, you can make your tests quite fast
Dec 28, 2022
3
Level 8
Change database just for one test (SQLite to MySQL)
Hi all, (this thread is not about setting one database for test and another for development)
I am using SQLite for testing. Everything is nice but one thing: I use one package that performs a query not supported by SQLite. One option that I have tested succesfully is changing phpunit.xml configuration to use a MySQL database during testing (separate database than dev database). After doing this, the test that was not passing is now doing so. So, fantastic. The problem? It is much much slower.
So I thought that, maybe, there is a way to use SQLite for all tests and MySQL only for that specific test. How could this be approached?
Thanks!
Level 102
Please or to participate in this conversation.