diff options
Diffstat (limited to 'tests/mocks/MockParser.php')
-rw-r--r-- | tests/mocks/MockParser.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/mocks/MockParser.php b/tests/mocks/MockParser.php new file mode 100644 index 0000000..39c369c --- /dev/null +++ b/tests/mocks/MockParser.php @@ -0,0 +1,28 @@ +<?php +declare(strict_types=1); + +/** + * @author: Alexander Kiryukhin <alexander@kiryukhin.su> + * @license: MIT + */ + +use NeonXP\Dotenv\Parser\ParserInterface; +use NeonXP\Dotenv\Types\KeyValue; + +/** + * Class MockParser + */ +class MockParser implements ParserInterface +{ + + /** + * @param string $line + * @return KeyValue + */ + public function parseLine(string $line): KeyValue + { + list($key, $value) = explode("=", $line); + + return new KeyValue($key, $value); + } +}
\ No newline at end of file |