aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2019-11-28 21:11:43 +0100
committerMarc Alexander <admin@m-a-styles.de>2019-11-28 21:11:43 +0100
commit03e15166c72be6862fb1d3ca3a178196df80f971 (patch)
tree39d8da38b92d9c472c51b419bd98873f70ebf2c2 /tests
parentbf96786cda17d7f9505bc311179fe234cac49094 (diff)
parentd6f5b5ef6cd052d43f4bf75af423eaafd8ba9b07 (diff)
downloadforums-03e15166c72be6862fb1d3ca3a178196df80f971.tar
forums-03e15166c72be6862fb1d3ca3a178196df80f971.tar.gz
forums-03e15166c72be6862fb1d3ca3a178196df80f971.tar.bz2
forums-03e15166c72be6862fb1d3ca3a178196df80f971.tar.xz
forums-03e15166c72be6862fb1d3ca3a178196df80f971.zip
Merge pull request #5747 from JoshyPHP/ticket/16228
[ticket/16228] Fix BBCodes merging
Diffstat (limited to 'tests')
-rw-r--r--tests/text_formatter/s9e/bbcode_merger_test.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/text_formatter/s9e/bbcode_merger_test.php b/tests/text_formatter/s9e/bbcode_merger_test.php
index 815539056b..5ec0c91971 100644
--- a/tests/text_formatter/s9e/bbcode_merger_test.php
+++ b/tests/text_formatter/s9e/bbcode_merger_test.php
@@ -275,6 +275,22 @@ class phpbb_textformatter_s9e_bbcode_merger_test extends phpbb_test_case
</table>
<p> </p>'
],
+ [
+ // https://www.phpbb.com/community/viewtopic.php?f=438&t=2530451
+ '[issue]{NUMBER}[/issue]',
+ '<a href="/default/issues/{NUMBER}"> Issue #{NUMBER}</a>',
+
+ '[issue={SIMPLETEXT}]{NUMBER}[/issue]',
+ '<a href="/{SIMPLETEXT}/issues/{NUMBER}"> Issue #{NUMBER} ({SIMPLETEXT})</a>',
+
+ '[issue={SIMPLETEXT?}]{NUMBER}[/issue]',
+ '<a>
+ <xsl:choose>
+ <xsl:when test="@issue"><xsl:attribute name="href">/<xsl:value-of select="@issue"/>/issues/<xsl:value-of select="@content"/></xsl:attribute> Issue #<xsl:value-of select="@content"/> (<xsl:value-of select="@issue"/>)</xsl:when>
+ <xsl:otherwise><xsl:attribute name="href">/default/issues/<xsl:value-of select="@content"/></xsl:attribute> Issue #<xsl:value-of select="@content"/></xsl:otherwise>
+ </xsl:choose>
+ </a>'
+ ],
];
}
}