Skip to content

Instantly share code, notes, and snippets.

@tpraxl
Created January 27, 2018 06:21
Show Gist options
  • Save tpraxl/e929311b2db0014dd8a6d0c406ef7421 to your computer and use it in GitHub Desktop.
Save tpraxl/e929311b2db0014dd8a6d0c406ef7421 to your computer and use it in GitHub Desktop.
ochestra/testbench how to load a .env file
use Illuminate\Foundation\Bootstrap\LoadEnvironmentVariables;
abstract class TestCase extends \Orchestra\Testbench\TestCase
{
protected function getEnvironmentSetUp($app)
{
// make sure, our .env file is loaded
$app->useEnvironmentPath(__DIR__.'/..');
$app->bootstrapWith([LoadEnvironmentVariables::class]);
parent::getEnvironmentSetUp($app);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment