Unit testing for a pipeline

Hey Mautic

I am trying to get unit testing to work using a different database, but for the life of me I cannot get it to connect to the test db. Now we are currently using v3 of mautic and I am not the person who originally set this up but they do not use the env file. Instead they are using php config files.

I have done a good rumage and I see there is a config_test.php and modifying the part that has doctrine to connect to the test db is not helping. I have also included the following into the phpunit.xml.dist file in the app folder but this is also resulting in a SQLSTATE[HY000] [2002] Connection Refused

<server name="db_name" value="mautic2test" />

Has anyone been able to get unit testing to work with config files?

Thank you