enable email for PreferencesTest.php
authorumherirrender <umherirrender_de.wp@web.de>
Mon, 30 Apr 2012 07:29:45 +0000 (09:29 +0200)
committerumherirrender <umherirrender_de.wp@web.de>
Mon, 30 Apr 2012 07:29:45 +0000 (09:29 +0200)
The tests in PreferencesTest.php checking email things,
enable email to let the test run complete and not depend on the wiki
setting.

Change-Id: I21b34b31c52a10e0f4f6b918ee25d98a97ea5981

tests/phpunit/includes/PreferencesTest.php

index 89d9e0c..664f04a 100644 (file)
@@ -8,6 +8,7 @@ class PreferencesTest extends MediaWikiTestCase {
 
        function __construct() {
                parent::__construct();
+               global $wgEnableEmail;
 
                $this->users['noemail'] = new User;
 
@@ -23,6 +24,9 @@ class PreferencesTest extends MediaWikiTestCase {
 
                $this->context = new RequestContext;
                $this->context->setTitle( Title::newFromText('PreferencesTest') );
+
+               //some tests depends on email setting
+               $wgEnableEmail = true;
        }
 
        /**