Aug 31, 2022
2
Level 4
Set database for testing
I am currently trying to run a test and I get the error SQLSTATE[HY000] [2002] Connection refused. I have not changed any configuration in my config/database.php or phpunit.xml. I believe that the main point here is to decide the best strategy for TDD.
I want to use mysql and not sqlite, because I believe that having the real environment an advantage, but I don't know if can use it in memory, if I should create another container for a new database, or use the "official" database and container. Either way I believe I am going to get the same error again, but helping me decide the strategy to take is a fine too.
Please or to participate in this conversation.