diff --git a/tests/phpunit/DiscussionParserTest.php b/tests/phpunit/DiscussionParserTest.php index 48211dd01..f388b6dfe 100644 --- a/tests/phpunit/DiscussionParserTest.php +++ b/tests/phpunit/DiscussionParserTest.php @@ -115,6 +115,14 @@ class EchoDiscussionParserTest extends MediaWikiTestCase { 'nickname' => '', 'fancysig' => '0', ), + 'Admin' => array( + 'nickname' => '[[:User:Admin|Admin]]', + 'fancysig' => '1', + ), + 'Test11' => array( + 'nickname' => '', + 'fancysig' => '0', + ), ); protected function setUp() { @@ -270,6 +278,26 @@ class EchoDiscussionParserTest extends MediaWikiTestCase { ), ), ), + // T68512, leading colon in user page link in signature + array( + 'new' => 612485855, + 'old' => 612485595, + 'username' => 'Admin', + 'lang' => 'en', + 'pages' => array(), + 'title' => 'User_talk:Admin', + 'expected' => array( + array( + 'type' => 'mention', + 'agent' => 'Admin', + ), + array( + 'type' => 'edit-user-talk', + 'agent' => 'Admin', + ), + ), + 'precondition' => 'isParserFunctionsInstalled', + ), ); } diff --git a/tests/phpunit/revision_txt/612485595.txt b/tests/phpunit/revision_txt/612485595.txt new file mode 100644 index 000000000..18832d351 --- /dev/null +++ b/tests/phpunit/revision_txt/612485595.txt @@ -0,0 +1 @@ +Hello. diff --git a/tests/phpunit/revision_txt/612485855.txt b/tests/phpunit/revision_txt/612485855.txt new file mode 100644 index 000000000..2682a9b63 --- /dev/null +++ b/tests/phpunit/revision_txt/612485855.txt @@ -0,0 +1,4 @@ +Hello. +== Hi == +Hi [[User:Test11]]. [[:User:Admin|Admin]] 23:47, 6 July 2015 (UTC) +