w/s changes
[lhc/web/wiklou.git] / maintenance / parserTests.inc
index 4e9665e..05327c1 100644 (file)
@@ -657,7 +657,7 @@ class ParserTest {
                                $db->query( "DROP TABLE IF EXISTS $newTableName" );
                        } elseif ( in_array( $wgDBtype, array( 'postgres', 'oracle' ) ) ) {
                                /* DROPs wouldn't work due to Foreign Key Constraints (bug 14990, r58669)
-                                * Use "DROP TABLE IF EXISTS $newTableName CASCADE" for postgres? That 
+                                * Use "DROP TABLE IF EXISTS $newTableName CASCADE" for postgres? That
                                 * syntax would also work for mysql.
                                 */
                        } elseif ( $db->tableExists( $tbl ) ) {
@@ -1029,6 +1029,10 @@ class ParserTest {
         * @param $line Integer: the input line number, for reporting errors
         */
        public function addArticle( $name, $text, $line ) {
+               global $wgCapitalLinks;
+               $oldCapitalLinks = $wgCapitalLinks;
+               $wgCapitalLinks = true; // We only need this from SetupGlobals() See r70917#c8637
+
                $title = Title::newFromText( $name );
                if ( is_null( $title ) ) {
                        wfDie( "invalid title at line $line\n" );
@@ -1041,6 +1045,8 @@ class ParserTest {
 
                $art = new Article( $title );
                $art->insertNewArticle( $text, '', false, false );
+
+               $wgCapitalLinks = $oldCapitalLinks;
        }
 
        /**