Quantcast
Channel: Laravel News
Viewing all articles
Browse latest Browse all 1848

Using environment variables in Laravel tests →

$
0
0

Matt Stauffer has a new quick tutorial on how to implement an .env.test file for your unit 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.


Viewing all articles
Browse latest Browse all 1848

Latest Images

Trending Articles



Latest Images