Fix unit tests when $wgEmailAuthentication is set to false
authorAlexandre Emsenhuber <ialex.wiki@gmail.com>
Sat, 11 May 2013 20:14:18 +0000 (22:14 +0200)
committerAlexandre Emsenhuber <ialex.wiki@gmail.com>
Sat, 11 May 2013 20:14:18 +0000 (22:14 +0200)
Since d2a5cf3 (I0b906b23de), 'emailaddress' and 'emailauthentication'
fields don't have any more CSS classes when $wgEmailAuthentication is
set to false which is breaking the tests.

Force $wgEmailAuthentication to true, so that the tests work in all cases.

Change-Id: Idc156f88ff1bc8595009056166f13191cf5c5c25

tests/phpunit/includes/PreferencesTest.php

index b909f26..392ad08 100644 (file)
@@ -30,7 +30,10 @@ class PreferencesTest extends MediaWikiTestCase {
        protected function setUp() {
                parent::setUp();
 
-               $this->setMwGlobals( 'wgEnableEmail', true );
+               $this->setMwGlobals( array(
+                       'wgEnableEmail' => true,
+                       'wgEmailAuthentication' => true,
+               ) );
        }
 
        /**