From 8ea647570b87adda400e5a3ce6c91f4b51327a0d Mon Sep 17 00:00:00 2001 From: Александр Кирюхин Date: Fri, 19 Jan 2018 19:03:26 +0300 Subject: Remove KeyValue object --- tests/CompilerTest.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'tests/CompilerTest.php') diff --git a/tests/CompilerTest.php b/tests/CompilerTest.php index 9a820ec..ed9e757 100644 --- a/tests/CompilerTest.php +++ b/tests/CompilerTest.php @@ -6,7 +6,6 @@ declare(strict_types=1); * @license: MIT */ -use NeonXP\Dotenv\Types\KeyValue; use PHPUnit\Framework\TestCase; /** @@ -29,16 +28,16 @@ class CompilerTest extends TestCase 'KEY4' => 'Test VALUE1 VALUE3 => VALUE3', ]; $compiler = new \NeonXP\Dotenv\Compiler\Compiler(); - $collectionOfKeyValues = []; + $collectionOfarrays = []; foreach ($collection as $key => $value) { - $collectionOfKeyValues[] = new KeyValue($key, $value); + $collectionOfarrays[] = ['key' => $key, 'value' => $value]; } - $compiler->setRawCollection($collectionOfKeyValues); + $compiler->setRawCollection($collectionOfarrays); foreach ($tests as $key => $expected) { - $result = $compiler->compileKeyValue(new KeyValue($key, $collection[$key])); - $this->assertEquals($key, $result->getKey()); - $this->assertEquals($expected, $result->getValue()); + $result = $compiler->compile(['key' => $key, 'value' => $collection[$key]]); + $this->assertEquals($key, $result['key']); + $this->assertEquals($expected, $result['value']); } } } \ No newline at end of file -- cgit v1.2.3