env returns a default value
This commit is contained in:
parent
52d8e4c626
commit
4b543b0807
2 changed files with 14 additions and 2 deletions
tests
|
@ -21,4 +21,16 @@ class EnvironmentTest extends TestCase
|
|||
|
||||
$this->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'));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue