From 8caca131e44b88395c487845d51a8e83a6e01799 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Sun, 12 Aug 2012 21:47:06 +0200 Subject: [PATCH] Move method to its using test class rather then having a public static thing in the base test class Change-Id: Id82225d0fb65dcd30b5724ee4f2d7838dfcb5ea6 --- tests/phpunit/MediaWikiTestCase.php | 4 ---- tests/phpunit/includes/upload/UploadTest.php | 4 +++- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/phpunit/MediaWikiTestCase.php b/tests/phpunit/MediaWikiTestCase.php index c96eba02f6..2eee9f462f 100644 --- a/tests/phpunit/MediaWikiTestCase.php +++ b/tests/phpunit/MediaWikiTestCase.php @@ -326,10 +326,6 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase { } - public static function disableInterwikis( $prefix, &$data ) { - return false; - } - /** * Don't throw a warning if $function is deprecated and called later * diff --git a/tests/phpunit/includes/upload/UploadTest.php b/tests/phpunit/includes/upload/UploadTest.php index 4293d23b74..6948f5b19e 100644 --- a/tests/phpunit/includes/upload/UploadTest.php +++ b/tests/phpunit/includes/upload/UploadTest.php @@ -12,7 +12,9 @@ class UploadTest extends MediaWikiTestCase { $this->upload = new UploadTestHandler; $this->hooks = $wgHooks; - $wgHooks['InterwikiLoadPrefix'][] = 'MediaWikiTestCase::disableInterwikis'; + $wgHooks['InterwikiLoadPrefix'][] = function( $prefix, &$data ) { + return false; + }; } function tearDown() { -- 2.20.1