Join 25,000+ Laravel Developers and join the free Laravel Newsletter
Laravel Tutorials / updated: July 11, 2017

Using environment variables in Laravel tests

Matt Stauffer has a new quick tutorial on how to implement an .env.test file for your Laravel tests.

He starts out discussing ways of setting them through the phpunit.xml file but those would then be committed to the repo which isn’t ideal. With help he came up with the idea to utilize DotEnv and include the .env file from tests/TestCase.php.

Go read the full tutorial for all the details.

This appeared first on Laravel News

Visit Resource →

Laravel News Partners


Join the weekly newsletter and never miss out on new tips, tutorials, and more.