From d0acd470ef577cd20c33fae35934696ab059f087 Mon Sep 17 00:00:00 2001 From: Martin Lindhe Date: Fri, 27 Nov 2015 22:09:06 +0100 Subject: [PATCH] test: add failing test for bug --- tests/GenerateTest.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/tests/GenerateTest.php b/tests/GenerateTest.php index e55f3d0..6a9366b 100644 --- a/tests/GenerateTest.php +++ b/tests/GenerateTest.php @@ -118,4 +118,29 @@ function testNamed() $this->destroyLocaleFilesFrom($arr, $root); } + + function testLeaveHtmlTags() + { + $arr = [ + 'en' => [ + 'help' => [ + 'yes' => 'see ', + ] + ] + ]; + + $root = $this->generateLocaleFilesFrom($arr); + + $this->assertEquals( + 'export default {' . PHP_EOL + . ' "en": {' . PHP_EOL + . ' "help": {' . PHP_EOL + . ' "yes": "see ",' . PHP_EOL + . ' }' . PHP_EOL + . ' }' . PHP_EOL + . '}' . PHP_EOL, + (new Generator)->generateFromPath($root)); + + $this->destroyLocaleFilesFrom($arr, $root); + } }