aboutsummaryrefslogtreecommitdiff
path: root/tests/CompilerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/CompilerTest.php')
-rw-r--r--tests/CompilerTest.php13
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