You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using this method all .env files, even .env.test.local file will be overwritten. In that case my tests runs on DATABASE_URL which is defined in docker-compose what is wrong, becouse test env has another database connection. My question is if it is possible to define symfony envs with docker-compsose for both dev and test environment
The text was updated successfully, but these errors were encountered:
Your DATABASE_URL for your tests can be defined in the phpunit.xml file.
Otherwise you have to define your APP_ENV=test in the phpunit.xml and use a bootstrap file to load your configuration with something like this : (new Dotenv())->bootEnv(dirname(__DIR__)'/.env');.
we can use docker compose environment element to define symfony envs. For example DATABASE_URL.
Using this method all
.env
files, even .env.test.local
file will be overwritten. In that case my tests runs on DATABASE_URL which is defined in docker-compose what is wrong, becouse test env has another database connection. My question is if it is possible to define symfony envs with docker-compsose for both dev and test environmentThe text was updated successfully, but these errors were encountered: