Merge "cleanupTitles: Don't add 'Broken/' prefix if the title is valid without it"
[lhc/web/wiklou.git] / tests / parser / ParserTestRunner.php
index e07d4a0..9b5897c 100644 (file)
@@ -290,10 +290,10 @@ class ParserTestRunner {
                // Set up null lock managers
                $setup['wgLockManagers'] = [ [
                        'name' => 'fsLockManager',
-                       'class' => 'NullLockManager',
+                       'class' => NullLockManager::class,
                ], [
                        'name' => 'nullLockManager',
-                       'class' => 'NullLockManager',
+                       'class' => NullLockManager::class,
                ] ];
                $reset = function () {
                        LockManagerGroup::destroySingletons();
@@ -435,7 +435,7 @@ class ParserTestRunner {
 
                return new RepoGroup(
                        [
-                               'class' => 'MockLocalRepo',
+                               'class' => MockLocalRepo::class,
                                'name' => 'local',
                                'url' => 'http://example.com/images',
                                'hashLevels' => 2,
@@ -1151,6 +1151,8 @@ class ParserTestRunner {
         * @return array
         */
        private function listTables() {
+               global $wgCommentTableSchemaMigrationStage;
+
                $tables = [ 'user', 'user_properties', 'user_former_groups', 'page', 'page_restrictions',
                        'protected_titles', 'revision', 'ip_changes', 'text', 'pagelinks', 'imagelinks',
                        'categorylinks', 'templatelinks', 'externallinks', 'langlinks', 'iwlinks',
@@ -1160,6 +1162,13 @@ class ParserTestRunner {
                        'archive', 'user_groups', 'page_props', 'category'
                ];
 
+               if ( $wgCommentTableSchemaMigrationStage >= MIGRATION_WRITE_BOTH ) {
+                       // The new tables for comments are in use
+                       $tables[] = 'comment';
+                       $tables[] = 'revision_comment_temp';
+                       $tables[] = 'image_comment_temp';
+               }
+
                if ( in_array( $this->db->getType(), [ 'mysql', 'sqlite', 'oracle' ] ) ) {
                        array_push( $tables, 'searchindex' );
                }