Deprecate MediaWikiTestCase::stashMwGlobals
[lhc/web/wiklou.git] / tests / phpunit / includes / PreferencesTest.php
index fe431b6..4d3b195 100644 (file)
@@ -35,15 +35,16 @@ class PreferencesTest extends MediaWikiTestCase {
        protected function setUp() {
                parent::setUp();
 
-               $this->setMwGlobals( array(
+               $this->setMwGlobals( [
                        'wgEnableEmail' => true,
                        'wgEmailAuthentication' => true,
-               ) );
+               ] );
        }
 
        /**
-        * Placeholder to verify bug 34302
+        * Placeholder to verify T36302
         * @covers Preferences::profilePreferences
+        * @deprecated replaced by DefaultPreferencesFactoryTest::testEmailAuthentication()
         */
        public function testEmailAuthenticationFieldWhenUserHasNoEmail() {
                $prefs = $this->prefsFor( 'noemail' );
@@ -54,8 +55,9 @@ class PreferencesTest extends MediaWikiTestCase {
        }
 
        /**
-        * Placeholder to verify bug 34302
+        * Placeholder to verify T36302
         * @covers Preferences::profilePreferences
+        * @deprecated replaced by DefaultPreferencesFactoryTest::testEmailAuthentication()
         */
        public function testEmailAuthenticationFieldWhenUserEmailNotAuthenticated() {
                $prefs = $this->prefsFor( 'notauth' );
@@ -66,8 +68,9 @@ class PreferencesTest extends MediaWikiTestCase {
        }
 
        /**
-        * Placeholder to verify bug 34302
+        * Placeholder to verify T36302
         * @covers Preferences::profilePreferences
+        * @deprecated replaced by DefaultPreferencesFactoryTest::testEmailAuthentication()
         */
        public function testEmailAuthenticationFieldWhenUserEmailIsAuthenticated() {
                $prefs = $this->prefsFor( 'auth' );
@@ -79,13 +82,9 @@ class PreferencesTest extends MediaWikiTestCase {
 
        /** Helper */
        protected function prefsFor( $user_key ) {
-               $preferences = array();
-               Preferences::profilePreferences(
+               return Preferences::getPreferences(
                        $this->prefUsers[$user_key],
-                       $this->context,
-                       $preferences
+                       $this->context
                );
-
-               return $preferences;
        }
 }