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

Commit

Permalink
test: add failing test for bug
Browse files Browse the repository at this point in the history
  • Loading branch information
martinlindhe committed Nov 27, 2015
1 parent aac9136 commit d0acd47
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tests/GenerateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,29 @@ function testNamed()

$this->destroyLocaleFilesFrom($arr, $root);
}

function testLeaveHtmlTags()
{
$arr = [
'en' => [
'help' => [
'yes' => 'see <a href="mailto:mail@com">',
]
]
];

$root = $this->generateLocaleFilesFrom($arr);

$this->assertEquals(
'export default {' . PHP_EOL
. ' "en": {' . PHP_EOL
. ' "help": {' . PHP_EOL
. ' "yes": "see <a href=\"mailto:mail@com\">",' . PHP_EOL
. ' }' . PHP_EOL
. ' }' . PHP_EOL
. '}' . PHP_EOL,
(new Generator)->generateFromPath($root));

$this->destroyLocaleFilesFrom($arr, $root);
}
}

0 comments on commit d0acd47

Please sign in to comment.