aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/functional/private_messages_test.php2
-rw-r--r--tests/text_formatter/s9e/bbcode_merger_test.php16
2 files changed, 17 insertions, 1 deletions
diff --git a/tests/functional/private_messages_test.php b/tests/functional/private_messages_test.php
index 7fda26fb49..ce709524a9 100644
--- a/tests/functional/private_messages_test.php
+++ b/tests/functional/private_messages_test.php
@@ -85,7 +85,7 @@ class phpbb_functional_private_messages_test extends phpbb_functional_test_case
public function test_quote_pm()
{
$text = 'This is a test private message sent by the testing framework.';
- $expected = "(\\[quote=admin time=\\d+ user_id=2\\]\n" . $text . "\n\\[/quote\\])";
+ $expected = "(\\[quote=admin msg_id=\\d+ time=\\d+ user_id=2\\]\n" . $text . "\n\\[/quote\\])";
$this->login();
$message_id = $this->create_private_message('Test', $text, array(2));
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>'
+ ],
];
}
}