Introduce preference filters
[lhc/web/wiklou.git] / tests / phpunit / includes / specials / SpecialPreferencesTest.php
index c8158ae..cd6cd3b 100644 (file)
@@ -25,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 ) );
@@ -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() );