aboutsummaryrefslogtreecommitdiff
path: root/tests/DotenvTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/DotenvTest.php')
-rw-r--r--tests/DotenvTest.php9
1 files changed, 2 insertions, 7 deletions
diff --git a/tests/DotenvTest.php b/tests/DotenvTest.php
index 59dd8b0..757ce70 100644
--- a/tests/DotenvTest.php
+++ b/tests/DotenvTest.php
@@ -11,7 +11,6 @@ use NeonXP\Dotenv\Dotenv;
use NeonXP\Dotenv\Exception\RuntimeException;
use NeonXP\Dotenv\Loader\LoaderInterface;
use NeonXP\Dotenv\Parser\ParserInterface;
-
use PHPUnit\Framework\TestCase;
/**
@@ -45,12 +44,8 @@ class DotenvTest extends TestCase
{
$dotenv = new Dotenv($this->mockLoader, $this->mockParser, $this->mockCompiler);
- try {
- $dotenv->get('TEST1');
- $this->assertTrue(false, 'Dotenv must throws exception if it not loaded');
- } catch (RuntimeException $exception) {
- $this->assertTrue(true, 'Dotenv must throws exception if it not loaded');
- }
+ $this->expectException(RuntimeException::class);
+ $dotenv->get('TEST1');
$dotenv->load();