-
-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to check if I'm in a testing environment #420
Comments
What I've done that worked, but I didn't know if it was preferred:
<php>
<server name="APP_ENV" value="testing"/>
</php>
'env' => env('APP_ENV', 'development'), |
@owenvoke Do know why this is not working on Laravel Zero? Couldn't find the reason. |
I think this is defaulted to |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In Laravel, I would normally use one of these methods to check if I'm in a testing environment:
\App\environment() === 'testing'
config('app.env') === 'testing'
\App::runningUnitTests()
But in Laravel Zero, the first two come back as
development
and the third isfalse
.What's the Laravel Zero idiomatic way to fix this?
Thanks!
The text was updated successfully, but these errors were encountered: