diff options
Diffstat (limited to 'tests/text_processing')
8 files changed, 38 insertions, 8 deletions
diff --git a/tests/text_processing/generate_text_for_display_test.php b/tests/text_processing/generate_text_for_display_test.php index dfbd0977a0..b8b5b18561 100644 --- a/tests/text_processing/generate_text_for_display_test.php +++ b/tests/text_processing/generate_text_for_display_test.php @@ -190,7 +190,7 @@ class phpbb_text_processing_generate_text_for_display_test extends phpbb_test_ca ), array( '<r><E>:)</E></r>', - '<img class="smilies" src="phpBB/images/smilies/icon_e_smile.gif" alt=":)" title="Smile">' + '<img class="smilies" src="phpBB/images/smilies/icon_e_smile.gif" width="15" height="17" alt=":)" title="Smile">' ), array( '<r><E>:)</E></r>', diff --git a/tests/text_processing/smilies_test.php b/tests/text_processing/smilies_test.php index ebdbe7dadc..3778e5f58c 100644 --- a/tests/text_processing/smilies_test.php +++ b/tests/text_processing/smilies_test.php @@ -30,19 +30,19 @@ class phpbb_text_processing_smilies_test extends phpbb_test_case return array( array( ':) beginning', - '<img class="smilies" src="phpBB/images/smilies/icon_e_smile.gif" alt=":)" title="Smile"> beginning' + '<img class="smilies" src="phpBB/images/smilies/icon_e_smile.gif" width="15" height="17" alt=":)" title="Smile"> beginning' ), array( 'end :)', - 'end <img class="smilies" src="phpBB/images/smilies/icon_e_smile.gif" alt=":)" title="Smile">' + 'end <img class="smilies" src="phpBB/images/smilies/icon_e_smile.gif" width="15" height="17" alt=":)" title="Smile">' ), array( ':)', - '<img class="smilies" src="phpBB/images/smilies/icon_e_smile.gif" alt=":)" title="Smile">' + '<img class="smilies" src="phpBB/images/smilies/icon_e_smile.gif" width="15" height="17" alt=":)" title="Smile">' ), array( 'xx (18) 8) xx', - 'xx (18) <img class="smilies" src="phpBB/images/smilies/custom.gif" alt="8)" title="8)"> xx' + 'xx (18) <img class="smilies" src="phpBB/images/smilies/custom.gif" width="17" height="18" alt="8)" title="8)"> xx' ), ); } diff --git a/tests/text_processing/tickets_data/PHPBB3-13425.html b/tests/text_processing/tickets_data/PHPBB3-13425.html index 9a042dc558..a3b6d21f40 100644 --- a/tests/text_processing/tickets_data/PHPBB3-13425.html +++ b/tests/text_processing/tickets_data/PHPBB3-13425.html @@ -1 +1 @@ -<blockquote class="uncited"><div><img class="smilies" src="phpBB/images/smilies/icon_lol.gif" alt=":lol:" title="Laughing"> starts with a smiley</div></blockquote>
\ No newline at end of file +<blockquote class="uncited"><div><img class="smilies" src="phpBB/images/smilies/icon_lol.gif" width="15" height="17" alt=":lol:" title="Laughing"> starts with a smiley</div></blockquote>
\ No newline at end of file diff --git a/tests/text_processing/tickets_data/PHPBB3-14846.html b/tests/text_processing/tickets_data/PHPBB3-14846.html new file mode 100644 index 0000000000..461ca25bc6 --- /dev/null +++ b/tests/text_processing/tickets_data/PHPBB3-14846.html @@ -0,0 +1 @@ +<div style="padding: .2em .5em; font-size: .8em; width: 200px; background: #FFD;">moderator text<div style="font-weight: bold; text-align: right">- Mickroz</div></div>
\ No newline at end of file diff --git a/tests/text_processing/tickets_data/PHPBB3-14846.txt b/tests/text_processing/tickets_data/PHPBB3-14846.txt new file mode 100644 index 0000000000..ded7b3f1fe --- /dev/null +++ b/tests/text_processing/tickets_data/PHPBB3-14846.txt @@ -0,0 +1 @@ +[mod=Mickroz]moderator text[/mod]
\ No newline at end of file diff --git a/tests/text_processing/tickets_data/PHPBB3-14846.xml b/tests/text_processing/tickets_data/PHPBB3-14846.xml new file mode 100644 index 0000000000..94b094f0e3 --- /dev/null +++ b/tests/text_processing/tickets_data/PHPBB3-14846.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<dataset> + <table name="phpbb_bbcodes"> + <column>bbcode_id</column> + <column>bbcode_tag</column> + <column>bbcode_helpline</column> + <column>display_on_posting</column> + <column>bbcode_match</column> + <column>bbcode_tpl</column> + <column>first_pass_match</column> + <column>first_pass_replace</column> + <column>second_pass_match</column> + <column>second_pass_replace</column> + + <row> + <value>13</value> + <value>mod=</value> + <value></value> + <value>1</value> + <value>[mod={TEXT1}]{TEXT2}[/mod]</value> + <value><![CDATA[<div style="padding: .2em .5em; font-size: .8em; width: 200px; background: #FFD;">{TEXT2}<div style="font-weight: bold; text-align: right">- {TEXT1}</div></div>]]></value> + <value><![CDATA[!\[mod\=(.*?)\](.*?)\[/mod\]!ies]]></value> + <value><![CDATA['[mod='.str_replace(array("\r\n", '\"', '\'', '(', ')'), array("\n", '"', ''', '(', ')'), trim('${1}')).':$uid]'.str_replace(array("\r\n", '\"', '\'', '(', ')'), array("\n", '"', ''', '(', ')'), trim('${2}')).'[/mod:$uid]']]></value> + <value><![CDATA[!\[mod\=(.*?):$uid\](.*?)\[/mod:$uid\]!s]]></value> + <value><![CDATA[<div style="padding: .2em .5em; font-size: .8em; width: 200px; background: #FFD;">${2}<div style="font-weight: bold; text-align: right">- ${1}</div></div>]]></value> + </row> + </table> +</dataset> diff --git a/tests/text_processing/tickets_data/PHPBB3-7187.html b/tests/text_processing/tickets_data/PHPBB3-7187.html index 9138779d29..a37cdf038e 100644 --- a/tests/text_processing/tickets_data/PHPBB3-7187.html +++ b/tests/text_processing/tickets_data/PHPBB3-7187.html @@ -1 +1 @@ -<blockquote class="uncited"><div><img class="smilies" src="phpBB/images/smilies/icon_e_geek.gif" alt=":geek:" title="Geek"> <img class="smilies" src="phpBB/images/smilies/icon_e_ugeek.gif" alt=":ugeek:" title="Uber Geek"></div></blockquote>
\ No newline at end of file +<blockquote class="uncited"><div><img class="smilies" src="phpBB/images/smilies/icon_e_geek.gif" width="17" height="17" alt=":geek:" title="Geek"> <img class="smilies" src="phpBB/images/smilies/icon_e_ugeek.gif" width="17" height="18" alt=":ugeek:" title="Uber Geek"></div></blockquote>
\ No newline at end of file diff --git a/tests/text_processing/tickets_data/PHPBB3-7275.html b/tests/text_processing/tickets_data/PHPBB3-7275.html index 12502833fd..470aebb5d0 100644 --- a/tests/text_processing/tickets_data/PHPBB3-7275.html +++ b/tests/text_processing/tickets_data/PHPBB3-7275.html @@ -1 +1 @@ -<div align="center"><img class="smilies" src="phpBB/images/smilies/icon_e_smile.gif" alt=":)" title="Smile"></div>
\ No newline at end of file +<div align="center"><img class="smilies" src="phpBB/images/smilies/icon_e_smile.gif" width="15" height="17" alt=":)" title="Smile"></div>
\ No newline at end of file |