diff options
author | Александр Кирюхин <alexander@kiryukhin.su> | 2018-01-19 19:03:26 +0300 |
---|---|---|
committer | Александр Кирюхин <alexander@kiryukhin.su> | 2018-01-19 19:03:26 +0300 |
commit | 8ea647570b87adda400e5a3ce6c91f4b51327a0d (patch) | |
tree | 7c5d328b41e64c3e78ac89c9674747346233c87a /tests/CompilerTest.php | |
parent | 47c9d580c6e799e72b6a70b22dd5107790b1d3e9 (diff) |
Diffstat (limited to 'tests/CompilerTest.php')
-rw-r--r-- | tests/CompilerTest.php | 13 |
1 files changed, 6 insertions, 7 deletions
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 |