From 13a756bfb7f73bdbd89e178617345afa18210b69 Mon Sep 17 00:00:00 2001 From: JoshyPHP Date: Thu, 21 Jul 2016 03:37:44 +0200 Subject: [ticket/14700] Prevent an exception on duplicate smilies in text_formatter PHPBB3-14700 --- tests/text_formatter/s9e/factory_test.php | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests/text_formatter/s9e/factory_test.php') 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( + ':)', + $parser->parse(':)') + ); + } + /** * @testdox {INTTEXT} is supported in custom BBCodes */ -- cgit v1.2.1