From 0e491a12afa2b678bbe4f3dcf87a2fc908c27db9 Mon Sep 17 00:00:00 2001 From: Platonides Date: Wed, 27 Oct 2010 22:27:23 +0000 Subject: [PATCH] Do NOT use hardcoded passwords! Not even if the user agreed to run destructive tests. 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/maintenance/tests/phpunit/includes/api/ApiSetup.php b/maintenance/tests/phpunit/includes/api/ApiSetup.php index 54f2fa5953..7ffa807003 100644 --- a/maintenance/tests/phpunit/includes/api/ApiSetup.php +++ b/maintenance/tests/phpunit/includes/api/ApiSetup.php @@ -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(); } } + -- 2.20.1