docs update
[lhc/web/wiklou.git] / maintenance / parserTests.inc
index 563f8d6..00b1fe1 100644 (file)
@@ -257,6 +257,7 @@ class ParserTest {
         * @return bool
         */
        private function runTest( $desc, $input, $result, $opts ) {
+               global $wgParserConf;
                if( $this->showProgress ) {
                        $this->showTesting( $desc );
                }
@@ -281,7 +282,8 @@ class ParserTest {
 
                $noxml = (bool)preg_match( '~\\b noxml \\b~x', $opts );
 
-               $parser = new Parser;
+               $class = $wgParserConf['class'];
+               $parser = new $class( $wgParserConf );
                foreach( $this->hooks as $tag => $callback ) {
                        $parser->setHook( $tag, $callback );
                }
@@ -351,7 +353,7 @@ class ParserTest {
         */
        private function setupGlobals($opts = '') {
                # Save the prefixed / quoted table names for later use when we make the temporaries.
-               $db = wfGetDB( DB_READ );
+               $db = wfGetDB( DB_SLAVE );
                $this->oldTableNames = array();
                foreach( $this->listTables() as $table ) {
                        $this->oldTableNames[$table] = $db->tableName( $table );
@@ -433,7 +435,7 @@ class ParserTest {
                        'site_stats', 'hitcounter',     'ipblocks', 'image', 'oldimage',
                        'recentchanges', 'watchlist', 'math', 'interwiki',
                        'querycache', 'objectcache', 'job', 'redirect', 'querycachetwo',
-                       'archive', 'user_groups'
+                       'archive', 'user_groups', 'page_props'
                );
 
                if ($wgDBtype === 'mysql')