summaryrefslogtreecommitdiff
path: root/tests/phpunit/skins/SideBarTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/phpunit/skins/SideBarTest.php')
-rw-r--r--tests/phpunit/skins/SideBarTest.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/phpunit/skins/SideBarTest.php b/tests/phpunit/skins/SideBarTest.php
index 47182a71..a9f56900 100644
--- a/tests/phpunit/skins/SideBarTest.php
+++ b/tests/phpunit/skins/SideBarTest.php
@@ -105,6 +105,36 @@ class SideBarTest extends MediaWikiLangTestCase {
);
}
+ /** bug 33321 */
+ function testTrickyPipe() {
+ $this->assertSidebar(
+ array( 'Title' => array(
+ # The first 2 are skipped
+ # Doesn't really test the url properly
+ # because it will vary with $wgArticlePath et al.
+ # ** Baz|Fred
+ array(
+ 'text' => 'Fred',
+ 'href' => Title::newFromText( 'Baz' )->getLocalUrl(),
+ 'id' => 'n-Fred',
+ 'active' => null,
+ ),
+ array(
+ 'text' => 'title-to-display',
+ 'href' => Title::newFromText( 'page-to-go-to' )->getLocalUrl(),
+ 'id' => 'n-title-to-display',
+ 'active' => null,
+ ),
+ )),
+'* Title
+** {{PAGENAME|Foo}}
+** Bar
+** Baz|Fred
+** {{PLURAL:1|page-to-go-to{{int:pipe-separator/en}}title-to-display|branch not taken}}
+'
+ );
+
+ }
#### Attributes for external links ##########################