X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=blobdiff_plain;f=tests%2Fparser%2FParserTestRunner.php;h=0e6a3eed77b1b9958da20e35e34d758d4bef421c;hb=007bfbf83578df5010415d5822c6aec057ffaa88;hp=3dee52136d9243306b6869aed65c4904113a780f;hpb=8cd4ba26eb3d93ed57b9bf59d53bb4213d34bbc7;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/parser/ParserTestRunner.php b/tests/parser/ParserTestRunner.php index 3dee52136d..0e6a3eed77 100644 --- a/tests/parser/ParserTestRunner.php +++ b/tests/parser/ParserTestRunner.php @@ -75,11 +75,6 @@ class ParserTestRunner { */ private $dbClone; - /** - * @var TidySupport - */ - private $tidySupport; - /** * @var TidyDriverBase */ @@ -167,12 +162,6 @@ class ParserTestRunner { $this->disableSaveParse = !empty( $options['disable-save-parse'] ); - $this->tidySupport = new TidySupport( !empty( $options['use-tidy-config'] ) ); - if ( !$this->tidySupport->isEnabled() ) { - $this->recorder->warning( - "Warning: tidy is not installed, skipping some tests\n" ); - } - if ( isset( $options['upload-dir'] ) ) { $this->uploadDir = $options['upload-dir']; } @@ -833,12 +822,7 @@ class ParserTestRunner { $options->setTimestamp( $this->getFakeTimestamp() ); if ( isset( $opts['tidy'] ) ) { - if ( !$this->tidySupport->isEnabled() ) { - $this->recorder->skipped( $test, 'tidy extension is not installed' ); - return false; - } else { - $options->setTidy( true ); - } + $options->setTidy( true ); } if ( isset( $opts['title'] ) ) { @@ -1130,7 +1114,7 @@ class ParserTestRunner { if ( isset( $opts['tidy'] ) ) { // Cache a driver instance if ( $this->tidyDriver === null ) { - $this->tidyDriver = MWTidy::factory( $this->tidySupport->getConfig() ); + $this->tidyDriver = MWTidy::factory(); } $tidy = $this->tidyDriver; } else { @@ -1140,6 +1124,7 @@ class ParserTestRunner { # Suppress warnings about running tests without tidy Wikimedia\suppressWarnings(); wfDeprecated( 'disabling tidy' ); + wfDeprecated( 'MWTidy::setInstance' ); Wikimedia\restoreWarnings(); MWTidy::setInstance( $tidy ); @@ -1214,7 +1199,7 @@ class ParserTestRunner { * @return array */ private function listTables() { - global $wgCommentTableSchemaMigrationStage, $wgActorTableSchemaMigrationStage; + global $wgActorTableSchemaMigrationStage; $tables = [ 'user', 'user_properties', 'user_former_groups', 'page', 'page_restrictions', 'protected_titles', 'revision', 'ip_changes', 'text', 'pagelinks', 'imagelinks', @@ -1224,15 +1209,9 @@ class ParserTestRunner { 'querycache', 'objectcache', 'job', 'l10n_cache', 'redirect', 'querycachetwo', 'archive', 'user_groups', 'page_props', 'category', 'slots', 'content', 'slot_roles', 'content_models', + 'comment', 'revision_comment_temp', ]; - if ( $wgCommentTableSchemaMigrationStage >= MIGRATION_WRITE_BOTH ) { - // The new tables for comments are in use - $tables[] = 'comment'; - $tables[] = 'revision_comment_temp'; - $tables[] = 'image_comment_temp'; - } - if ( $wgActorTableSchemaMigrationStage & SCHEMA_COMPAT_WRITE_NEW ) { // The new tables for actors are in use $tables[] = 'actor';