Create a new $wgUser to initialize default settings properly. Not sure what's the...
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 19 Jan 2005 09:05:24 +0000 (09:05 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 19 Jan 2005 09:05:24 +0000 (09:05 +0000)
maintenance/parserTests.php

index fd2293f..575e192 100644 (file)
@@ -298,6 +298,7 @@ class ParserTest {
                        'wgNamespacesWithSubpages' => array( 0 => preg_match('/\\bsubpage\\b/i', $opts)),
                        'wgMaxTocLevel' => 999,
                        'wgCapitalLinks' => true,
+                       'wgDefaultUserOptions' => array(),
                        );
                $this->savedGlobals = array();
                foreach( $settings as $var => $val ) {
@@ -307,6 +308,9 @@ class ParserTest {
                $GLOBALS['wgLoadBalancer']->loadMasterPos();
                $GLOBALS['wgMessageCache']->initialise( new BagOStuff(), false, 0, $GLOBALS['wgDBname'] );
                $this->setupDatabase();
+               
+               global $wgUser;
+               $wgUser = new User();
        }
        
        # List of temporary tables to create, without prefix