summaryrefslogtreecommitdiff
path: root/tests/phpunit/includes/GlobalFunctions/wfExpandUrlTest.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-12-08 09:55:49 +0100
committerPierre Schmitz <pierre@archlinux.de>2013-12-08 09:55:49 +0100
commit4ac9fa081a7c045f6a9f1cfc529d82423f485b2e (patch)
treeaf68743f2f4a47d13f2b0eb05f5c4aaf86d8ea37 /tests/phpunit/includes/GlobalFunctions/wfExpandUrlTest.php
parentaf4da56f1ad4d3ef7b06557bae365da2ea27a897 (diff)
Update to MediaWiki 1.22.0
Diffstat (limited to 'tests/phpunit/includes/GlobalFunctions/wfExpandUrlTest.php')
-rw-r--r--tests/phpunit/includes/GlobalFunctions/wfExpandUrlTest.php20
1 files changed, 9 insertions, 11 deletions
diff --git a/tests/phpunit/includes/GlobalFunctions/wfExpandUrlTest.php b/tests/phpunit/includes/GlobalFunctions/wfExpandUrlTest.php
index c1225e3e..41230a1e 100644
--- a/tests/phpunit/includes/GlobalFunctions/wfExpandUrlTest.php
+++ b/tests/phpunit/includes/GlobalFunctions/wfExpandUrlTest.php
@@ -1,16 +1,17 @@
<?php
/**
- * Tests for wfExpandUrl()
+ * @covers ::wfExpandUrl
*/
class WfExpandUrlTest extends MediaWikiTestCase {
- /** @dataProvider provideExpandableUrls */
+ /**
+ * @dataProvider provideExpandableUrls
+ */
public function testWfExpandUrl( $fullUrl, $shortUrl, $defaultProto, $server, $canServer, $httpsMode, $message ) {
// Fake $wgServer and $wgCanonicalServer
- global $wgServer, $wgCanonicalServer;
- $oldServer = $wgServer;
- $oldCanServer = $wgCanonicalServer;
- $wgServer = $server;
- $wgCanonicalServer = $canServer;
+ $this->setMwGlobals( array(
+ 'wgServer' => $server,
+ 'wgCanonicalServer' => $canServer,
+ ) );
// Fake $_SERVER['HTTPS'] if needed
if ( $httpsMode ) {
@@ -20,10 +21,6 @@ class WfExpandUrlTest extends MediaWikiTestCase {
}
$this->assertEquals( $fullUrl, wfExpandUrl( $shortUrl, $defaultProto ), $message );
-
- // Restore $wgServer and $wgCanonicalServer
- $wgServer = $oldServer;
- $wgCanonicalServer = $oldCanServer;
}
/**
@@ -108,6 +105,7 @@ class WfExpandUrlTest extends MediaWikiTestCase {
}
}
}
+
return $retval;
}
}