jeudi 9 mars 2023

Is there a way to override the .env.testing PHPUnit env variable for a specific test?

I am trying to override an ENV variable I set up in .env.testing, currently the implementation uses:

env('APP_ENV') which returns the value from .env.testing

However, I would like the value to be different for a specific test case. Solutions I have tried:

$_SERVER["APP_ENV"] = "local";

env('APP_ENV', 'another_value')

Any clues would be appreciated, I cannot find anything else online



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire