Skip to content
This repository was archived by the owner on Jul 16, 2020. It is now read-only.

Commit d0acd47

Browse files
committed
test: add failing test for bug
1 parent aac9136 commit d0acd47

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

tests/GenerateTest.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,4 +118,29 @@ function testNamed()
118118

119119
$this->destroyLocaleFilesFrom($arr, $root);
120120
}
121+
122+
function testLeaveHtmlTags()
123+
{
124+
$arr = [
125+
'en' => [
126+
'help' => [
127+
'yes' => 'see <a href="mailto:mail@com">',
128+
]
129+
]
130+
];
131+
132+
$root = $this->generateLocaleFilesFrom($arr);
133+
134+
$this->assertEquals(
135+
'export default {' . PHP_EOL
136+
. ' "en": {' . PHP_EOL
137+
. ' "help": {' . PHP_EOL
138+
. ' "yes": "see <a href=\"mailto:mail@com\">",' . PHP_EOL
139+
. ' }' . PHP_EOL
140+
. ' }' . PHP_EOL
141+
. '}' . PHP_EOL,
142+
(new Generator)->generateFromPath($root));
143+
144+
$this->destroyLocaleFilesFrom($arr, $root);
145+
}
121146
}

0 commit comments

Comments
 (0)