From b2e0cabdf31f5dd4583795a0ee83676cfdecc076 Mon Sep 17 00:00:00 2001 From: Platonides Date: Fri, 5 Nov 2010 22:10:15 +0000 Subject: [PATCH] Unneeded globals. Require for EDIT_TOKEN_SUFFIX. --- maintenance/tests/phpunit/includes/api/ApiUploadTest.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/maintenance/tests/phpunit/includes/api/ApiUploadTest.php b/maintenance/tests/phpunit/includes/api/ApiUploadTest.php index 39f19b0911..95e414f47a 100644 --- a/maintenance/tests/phpunit/includes/api/ApiUploadTest.php +++ b/maintenance/tests/phpunit/includes/api/ApiUploadTest.php @@ -18,6 +18,7 @@ // TODO: port the other Upload tests, and other API tests to this framework require_once( dirname( __FILE__ ) . '/RandomImageGenerator.php' ); +require_once( dirname( __FILE__ ) . '/../../../../../includes/User.php' ); /* Wraps the user object, so we can also retain full access to properties like password if we log in via the API */ class ApiTestUser { @@ -28,8 +29,6 @@ class ApiTestUser { public $user; function __construct( $username, $realname = 'Real Name', $email = 'sample@sample.com', $groups = array() ) { - global $wgMinimalPasswordLength; - $this->username = $username; $this->realname = $realname; $this->email = $email; @@ -83,7 +82,7 @@ abstract class ApiTestCase extends PHPUnit_Framework_TestCase { public static $users; function setUp() { - global $wgServer, $wgContLang, $wgAuth, $wgMemc, $wgRequest, $wgUser; + global $wgContLang, $wgAuth, $wgMemc, $wgRequest, $wgUser; $wgMemc = new FakeMemCachedClient(); $wgContLang = Language::factory( 'en' ); -- 2.20.1