(bug 37209) Make TextContentTest and WikitextContentTest work in all cases
[lhc/web/wiklou.git] / tests / phpunit / includes / PreferencesTest.php
index 0e12317..5e546ce 100644 (file)
@@ -1,5 +1,8 @@
 <?php
 
+/**
+ * @group Database
+ */
 class PreferencesTest extends MediaWikiTestCase {
        /** Array of User objects */
        private $prefUsers;
@@ -7,7 +10,6 @@ class PreferencesTest extends MediaWikiTestCase {
 
        function __construct() {
                parent::__construct();
-               global $wgEnableEmail;
 
                $this->prefUsers['noemail'] = new User;
 
@@ -23,9 +25,12 @@ class PreferencesTest extends MediaWikiTestCase {
 
                $this->context = new RequestContext;
                $this->context->setTitle( Title::newFromText('PreferencesTest') );
+       }
+
+       protected function setUp() {
+               parent::setUp();
 
-               //some tests depends on email setting
-               $wgEnableEmail = true;
+               $this->setMwGlobals( 'wgEnableEmail', true );
        }
 
        /**