In my .env, .env.local, .env.test and .env.test.local I have defined a LANG variable, to set the application language. To correctly test translations when I'm developing, in the dev environment (.dev.local file) I've set LANG=es, and it's working correctly. In production it's also working correctly, but in test, in the .dev.test.local file I've set LANG=ca but neither PHPUnit nor bin/console debug:container --env-vars --env=test show the correct value for this variable, it's value it's just es_ES.UTF-8, the value of the $LANG variable in my Ubuntu system.
I have other environment variables defined in the .dev.test.local file, and these are correctly (like the DATABASE_URL). I've also tried to add the LANG in the phpunit.xml.dist file (<env name="LANG" value="ca" />), but it the value doesn't change, it's still es_ES.UTF-8.
I've also deleted the var/cache/test directory, but it still doesn't work.
What I'm doing wrong? What can I do to change the language in the testing environment?
Aucun commentaire:
Enregistrer un commentaire