Do not insert page titles into querycache.qc_value
[lhc/web/wiklou.git] / tests / phpunit / includes / specials / SpecialPreferencesTest.php
index cd6cd3b..510a2f2 100644 (file)
@@ -21,10 +21,9 @@ 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 );
-
                $user = $this->createMock( User::class );
                $user->expects( $this->any() )
                        ->method( 'isAnon' )
@@ -47,6 +46,10 @@ class SpecialPreferencesTest extends MediaWikiTestCase {
                $user->method( 'getOptions' )
                        ->willReturn( [] );
 
+               // isAnyAllowed used to return null from the mock,
+               // thus revoke it's permissions.
+               $this->overrideUserPermissions( $user, [] );
+
                # Forge a request to call the special page
                $context = new RequestContext();
                $context->setRequest( new FauxRequest() );