From 4b543b0807abd9b7705da2a2b9bd03a6f8ea59f3 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Tue, 21 May 2019 12:37:59 +0100 Subject: [PATCH] env returns a default value --- src/helpers.php | 4 ++-- tests/EnvironmentTest.php | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/helpers.php b/src/helpers.php index 7b87a30..338a337 100644 --- a/src/helpers.php +++ b/src/helpers.php @@ -1,8 +1,8 @@ assertSame('prod', env('APP_ENV')); } + + /** @test */ + public function it_returns_a_default_value() + { + $this->assertSame('local', env('APP_ENV', 'local')); + } + + /** @test */ + public function it_returns_null_if_there_is_no_default() + { + $this->assertNull(env('APP_ENV')); + } }