X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fparser%2FParserTestRunner.php;h=4f6f6b675826d35fd336b4e2022fccdd3a924786;hb=63d96c15fde8d4d2842aa50c5ed2ce594aa0c674;hp=e07d4a0cf321bf94db9bd03a64c3356e04074b29;hpb=766b71ef7f65ac1866341782e7235ee5b0c55648;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/parser/ParserTestRunner.php b/tests/parser/ParserTestRunner.php index e07d4a0cf3..4f6f6b6758 100644 --- a/tests/parser/ParserTestRunner.php +++ b/tests/parser/ParserTestRunner.php @@ -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, @@ -811,10 +811,6 @@ class ParserTestRunner { $options = ParserOptions::newFromContext( $context ); $options->setTimestamp( $this->getFakeTimestamp() ); - if ( !isset( $opts['wrap'] ) ) { - $options->setWrapOutputClass( false ); - } - if ( isset( $opts['tidy'] ) ) { if ( !$this->tidySupport->isEnabled() ) { $this->recorder->skipped( $test, 'tidy extension is not installed' ); @@ -854,7 +850,8 @@ class ParserTestRunner { } else { $output = $parser->parse( $test['input'], $title, $options, true, true, 1337 ); $out = $output->getText( [ - 'allowTOC' => !isset( $opts['notoc'] ) + 'allowTOC' => !isset( $opts['notoc'] ), + 'unwrap' => !isset( $opts['wrap'] ), ] ); if ( isset( $opts['tidy'] ) ) { $out = preg_replace( '/\s+$/', '', $out ); @@ -892,7 +889,7 @@ class ParserTestRunner { if ( isset( $output ) && isset( $opts['showflags'] ) ) { $actualFlags = array_keys( TestingAccessWrapper::newFromObject( $output )->mFlags ); sort( $actualFlags ); - $out .= "\nflags=" . join( ', ', $actualFlags ); + $out .= "\nflags=" . implode( ', ', $actualFlags ); } ScopedCallback::consume( $teardownGuard ); @@ -1151,6 +1148,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 +1159,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' ); }