Merge "Recalculate user default options for each test"
[lhc/web/wiklou.git] / tests / phpunit / includes / specials / SpecialPreferencesTest.php
index bdfbb62..90f6ad9 100644 (file)
@@ -21,7 +21,7 @@ class SpecialPreferencesTest extends MediaWikiTestCase {
         * Test specifications by Alexandre "ialex" Emsenhuber.
         * @todo give this test a real name explaining what is being tested here
         */
-       public function testBug41337() {
+       public function testT43337() {
                // Set a low limit
                $this->setMwGlobals( 'wgMaxSigChars', 2 );
 
@@ -43,6 +43,10 @@ class SpecialPreferencesTest extends MediaWikiTestCase {
                        ]
                        ) );
 
+               # Needs to return something
+               $user->method( 'getOptions' )
+                       ->willReturn( [] );
+
                # Forge a request to call the special page
                $context = new RequestContext();
                $context->setRequest( new FauxRequest() );