Unneeded globals. Require for EDIT_TOKEN_SUFFIX.
authorPlatonides <platonides@users.mediawiki.org>
Fri, 5 Nov 2010 22:10:15 +0000 (22:10 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Fri, 5 Nov 2010 22:10:15 +0000 (22:10 +0000)
maintenance/tests/phpunit/includes/api/ApiUploadTest.php

index 39f19b0..95e414f 100644 (file)
@@ -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' );