Do NOT use hardcoded passwords! Not even if the user agreed to run destructive tests.
authorPlatonides <platonides@users.mediawiki.org>
Wed, 27 Oct 2010 22:27:23 +0000 (22:27 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Wed, 27 Oct 2010 22:27:23 +0000 (22:27 +0000)
The affected passwords have been disabled in r75588

Follow up r72475,r74213.
Additionally give descriptive names to the users.

Also see the mail to wikitech.

maintenance/tests/phpunit/includes/api/ApiSetup.php

index 54f2fa5..7ffa807 100644 (file)
@@ -33,8 +33,8 @@ abstract class ApiTestSetup extends PHPUnit_Framework_TestCase {
 
        static function setupUser() {
                if ( self::$user == null || self::$sysopUser == null ) {
-                       self::$user = new UserWrapper( 'Useruser', 'Passpass' );
-                       self::$sysopUser = new UserWrapper( 'Useruser1', 'Passpass1', 'sysop' );
+                       self::$user = new UserWrapper( 'User for MediaWiki automated tests', User::randomPassword() );
+                       self::$sysopUser = new UserWrapper( 'Sysop for MediaWiki automated tests', User::randomPassword(), 'sysop' );
                }
                
                $GLOBALS['wgUser'] = self::$sysopUser->user;
@@ -67,3 +67,4 @@ class UserWrapper {
                $this->user->saveSettings();
        }
 }
+