Magento 2 PHPUnit PHPUnit : How to force an environment variable in Unit Test ? By Sudhanshu Bajaj on Friday, October 25, 2019 In Magento 2 we all follow TDD approach and we often have a requirement to use the constants and global variables.