Skip to content

Commit

Permalink
Update testing.md
Browse files Browse the repository at this point in the history
  • Loading branch information
laurencei authored Feb 13, 2018
1 parent 50fa629 commit 78fae05
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ An `ExampleTest.php` file is provided in both the `Feature` and `Unit` test dire

When running tests via `phpunit`, Laravel will automatically set the configuration environment to `testing` because of the environment variables defined in the `phpunit.xml` file. Laravel also automatically configures the session and cache to the `array` driver while testing, meaning no session or cache data will be persisted while testing.

You may also create a `.env.testing` file. This file will override the `.env` file when running PHPUnit tests or executing Artisan commands with the `--env=testing` option.

You are free to define other testing environment configuration values as necessary. The `testing` environment variables may be configured in the `phpunit.xml` file, but make sure to clear your configuration cache using the `config:clear` Artisan command before running your tests!

<a name="creating-and-running-tests"></a>
Expand Down

0 comments on commit 78fae05

Please sign in to comment.