summaryrefslogtreecommitdiff
path: root/tests/phpunit/includes/LinkerTest.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2014-03-12 18:12:23 +0100
committerPierre Schmitz <pierre@archlinux.de>2014-03-12 18:12:23 +0100
commitd417de70fcf39e0a7a15ba780b597914d16ca0f7 (patch)
tree06ef8c333473660350b995abc03e18f3f85359eb /tests/phpunit/includes/LinkerTest.php
parenta4edbfa031eb4cd72678051f1510afde4f77951e (diff)
Update to MediaWiki 1.22.4
Diffstat (limited to 'tests/phpunit/includes/LinkerTest.php')
-rw-r--r--tests/phpunit/includes/LinkerTest.php71
1 files changed, 0 insertions, 71 deletions
diff --git a/tests/phpunit/includes/LinkerTest.php b/tests/phpunit/includes/LinkerTest.php
deleted file mode 100644
index b605f08f..00000000
--- a/tests/phpunit/includes/LinkerTest.php
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php
-
-class LinkerTest extends MediaWikiLangTestCase {
-
- /**
- * @dataProvider provideCasesForUserLink
- * @covers Linker::userLink
- */
- public function testUserLink( $expected, $userId, $userName, $altUserName = false, $msg = '' ) {
- $this->setMwGlobals( array(
- 'wgArticlePath' => '/wiki/$1',
- 'wgWellFormedXml' => true,
- ) );
-
- $this->assertEquals( $expected,
- Linker::userLink( $userId, $userName, $altUserName, $msg )
- );
- }
-
- public static function provideCasesForUserLink() {
- # Format:
- # - expected
- # - userid
- # - username
- # - optional altUserName
- # - optional message
- return array(
-
- ### ANONYMOUS USER ########################################
- array(
- '<a href="/wiki/Special:Contributions/JohnDoe" title="Special:Contributions/JohnDoe" class="mw-userlink">JohnDoe</a>',
- 0, 'JohnDoe', false,
- ),
- array(
- '<a href="/wiki/Special:Contributions/::1" title="Special:Contributions/::1" class="mw-userlink">::1</a>',
- 0, '::1', false,
- 'Anonymous with pretty IPv6'
- ),
- array(
- '<a href="/wiki/Special:Contributions/0:0:0:0:0:0:0:1" title="Special:Contributions/0:0:0:0:0:0:0:1" class="mw-userlink">::1</a>',
- 0, '0:0:0:0:0:0:0:1', false,
- 'Anonymous with almost pretty IPv6'
- ),
- array(
- '<a href="/wiki/Special:Contributions/0000:0000:0000:0000:0000:0000:0000:0001" title="Special:Contributions/0000:0000:0000:0000:0000:0000:0000:0001" class="mw-userlink">::1</a>',
- 0, '0000:0000:0000:0000:0000:0000:0000:0001', false,
- 'Anonymous with full IPv6'
- ),
- array(
- '<a href="/wiki/Special:Contributions/::1" title="Special:Contributions/::1" class="mw-userlink">AlternativeUsername</a>',
- 0, '::1', 'AlternativeUsername',
- 'Anonymous with pretty IPv6 and an alternative username'
- ),
-
- # IPV4
- array(
- '<a href="/wiki/Special:Contributions/127.0.0.1" title="Special:Contributions/127.0.0.1" class="mw-userlink">127.0.0.1</a>',
- 0, '127.0.0.1', false,
- 'Anonymous with IPv4'
- ),
- array(
- '<a href="/wiki/Special:Contributions/127.0.0.1" title="Special:Contributions/127.0.0.1" class="mw-userlink">AlternativeUsername</a>',
- 0, '127.0.0.1', 'AlternativeUsername',
- 'Anonymous with IPv4 and an alternative username'
- ),
-
- ### Regular user ##########################################
- # TODO!
- );
- }
-}