aboutsummaryrefslogtreecommitdiffstats
path: root/tests/text_formatter/s9e/factory_test.php
diff options
context:
space:
mode:
authorJoshyPHP <s9e.dev@gmail.com>2016-07-21 03:37:44 +0200
committerJoshyPHP <s9e.dev@gmail.com>2016-07-21 03:40:01 +0200
commit13a756bfb7f73bdbd89e178617345afa18210b69 (patch)
tree401fedffed7ec3541214d138f55b4749334eb1d1 /tests/text_formatter/s9e/factory_test.php
parent486ffa85a25ffb5415915c83c9cba81a4df2b528 (diff)
downloadforums-13a756bfb7f73bdbd89e178617345afa18210b69.tar
forums-13a756bfb7f73bdbd89e178617345afa18210b69.tar.gz
forums-13a756bfb7f73bdbd89e178617345afa18210b69.tar.bz2
forums-13a756bfb7f73bdbd89e178617345afa18210b69.tar.xz
forums-13a756bfb7f73bdbd89e178617345afa18210b69.zip
[ticket/14700] Prevent an exception on duplicate smilies in text_formatter
PHPBB3-14700
Diffstat (limited to 'tests/text_formatter/s9e/factory_test.php')
-rw-r--r--tests/text_formatter/s9e/factory_test.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/text_formatter/s9e/factory_test.php b/tests/text_formatter/s9e/factory_test.php
index e74337decc..368b8a4f4b 100644
--- a/tests/text_formatter/s9e/factory_test.php
+++ b/tests/text_formatter/s9e/factory_test.php
@@ -170,6 +170,17 @@ class phpbb_textformatter_s9e_factory_test extends phpbb_database_test_case
);
}
+ public function test_duplicate_smilies()
+ {
+ $fixture = __DIR__ . '/fixtures/smilies_duplicate.xml';
+ $parser = $this->get_test_case_helpers()->set_s9e_services(null, $fixture)->get('text_formatter.parser');
+
+ $this->assertSame(
+ '<r><E>:)</E></r>',
+ $parser->parse(':)')
+ );
+ }
+
/**
* @testdox {INTTEXT} is supported in custom BBCodes
*/