Merge "objectcache: add "epoch" parameter to WANObjectCache"
[lhc/web/wiklou.git] / tests / phpunit / includes / specials / SpecialPreferencesTest.php
index ac58d68..cd6cd3b 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 /**
+ * @group Preferences
  * @group Database
  *
  * @covers SpecialPreferences
@@ -24,7 +25,7 @@ class SpecialPreferencesTest extends MediaWikiTestCase {
                // Set a low limit
                $this->setMwGlobals( 'wgMaxSigChars', 2 );
 
-               $user = $this->createMock( 'User' );
+               $user = $this->createMock( User::class );
                $user->expects( $this->any() )
                        ->method( 'isAnon' )
                        ->will( $this->returnValue( false ) );
@@ -42,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() );