*/
private $dbClone;
- /**
- * @var TidySupport
- */
- private $tidySupport;
-
/**
* @var TidyDriverBase
*/
*/
private $runDisabled;
- /**
- * Run tests intended only for parsoid
- * @var bool
- */
- private $runParsoid;
-
/**
* Disable parse on article insertion
* @var bool
$this->fileBackendName = $options['file-backend'] ?? false;
$this->runDisabled = !empty( $options['run-disabled'] );
- $this->runParsoid = !empty( $options['run-parsoid'] );
$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'];
}
$setup['wgHtml5'] = true;
$setup['wgDisableLangConversion'] = false;
$setup['wgDisableTitleConversion'] = false;
+ $setup['wgMediaInTargetLanguage'] = false;
// "extra language links"
// see https://gerrit.wikimedia.org/r/111390
foreach ( $filenames as $filename ) {
$testFileInfo = TestFileReader::read( $filename, [
'runDisabled' => $this->runDisabled,
- 'runParsoid' => $this->runParsoid,
'regex' => $this->regex ] );
// Don't start the suite if there are no enabled tests in the file
$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'] ) ) {
+ [ 'ISBN' => true, 'PMID' => true, 'RFC' => true ],
// Test with legacy encoding by default until HTML5 is very stable and default
'wgFragmentMode' => [ 'legacy' ],
+ 'wgMediaInTargetLanguage' => self::getOptionValue( 'wgMediaInTargetLanguage', $opts, false ),
];
$nonIncludable = self::getOptionValue( 'wgNonincludableNamespaces', $opts, false );
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 {
$tidy = false;
}
+
+ # Suppress warnings about running tests without tidy
+ Wikimedia\suppressWarnings();
+ wfDeprecated( 'disabling tidy' );
+ wfDeprecated( 'MWTidy::setInstance' );
+ Wikimedia\restoreWarnings();
+
MWTidy::setInstance( $tidy );
$teardown[] = function () {
MWTidy::destroySingleton();
// The new tables for comments are in use
$tables[] = 'comment';
$tables[] = 'revision_comment_temp';
- $tables[] = 'image_comment_temp';
}
if ( $wgActorTableSchemaMigrationStage & SCHEMA_COMPAT_WRITE_NEW ) {
'bits' => 0,
'media_type' => MEDIATYPE_DRAWING,
'mime' => 'image/svg+xml',
- 'metadata' => serialize( [] ),
+ 'metadata' => serialize( [
+ 'version' => SvgHandler::SVG_METADATA_VERSION,
+ 'width' => 240,
+ 'height' => 180,
+ 'originalWidth' => '100%',
+ 'originalHeight' => '100%',
+ 'translations' => [
+ 'en' => SVGReader::LANG_FULL_MATCH,
+ 'ru' => SVGReader::LANG_FULL_MATCH,
+ ],
+ ] ),
'sha1' => Wikimedia\base_convert( '', 16, 36, 31 ),
'fileExists' => true
], $this->db->timestamp( '20010115123500' ), $user );