aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/text_formatter')
-rw-r--r--tests/text_formatter/s9e/factory_test.php11
-rw-r--r--tests/text_formatter/s9e/fixtures/smilies_duplicate.xml33
2 files changed, 44 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
*/
diff --git a/tests/text_formatter/s9e/fixtures/smilies_duplicate.xml b/tests/text_formatter/s9e/fixtures/smilies_duplicate.xml
new file mode 100644
index 0000000000..9645f3e516
--- /dev/null
+++ b/tests/text_formatter/s9e/fixtures/smilies_duplicate.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_smilies">
+ <column>smiley_id</column>
+ <column>code</column>
+ <column>emotion</column>
+ <column>smiley_url</column>
+ <column>smiley_width</column>
+ <column>smiley_height</column>
+ <column>smiley_order</column>
+ <column>display_on_posting</column>
+ <row>
+ <value>1</value>
+ <value>:)</value>
+ <value>:)</value>
+ <value>foo.png</value>
+ <value>15</value>
+ <value>17</value>
+ <value>2</value>
+ <value>1</value>
+ </row>
+ <row>
+ <value>2</value>
+ <value>:)</value>
+ <value>:)</value>
+ <value>bar.png</value>
+ <value>15</value>
+ <value>17</value>
+ <value>2</value>
+ <value>2</value>
+ </row>
+ </table>
+</dataset>