From 8ea647570b87adda400e5a3ce6c91f4b51327a0d Mon Sep 17 00:00:00 2001 From: Александр Кирюхин Date: Fri, 19 Jan 2018 19:03:26 +0300 Subject: Remove KeyValue object --- tests/DotenvTest.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'tests/DotenvTest.php') 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(); -- cgit v1.2.3