Merge "Diff and history link separated via CSS"
[lhc/web/wiklou.git] / tests / parser / ParserTestRunner.php
index 51fb86d..5c4c48c 100644 (file)
@@ -300,6 +300,7 @@ class ParserTestRunner {
                $setup['wgHtml5'] = true;
                $setup['wgDisableLangConversion'] = false;
                $setup['wgDisableTitleConversion'] = false;
+               $setup['wgMediaInTargetLanguage'] = false;
 
                // "extra language links"
                // see https://gerrit.wikimedia.org/r/111390
@@ -830,7 +831,7 @@ class ParserTestRunner {
         * @return ParserTestResult|false false if skipped
         */
        public function runTest( $test ) {
-               wfDebug( __METHOD__.": running {$test['desc']}" );
+               wfDebug( __METHOD__ . ": running {$test['desc']}" );
                $opts = $this->parseOptions( $test['options'] );
                $teardownGuard = $this->perTestSetup( $test );
 
@@ -1113,6 +1114,7 @@ class ParserTestRunner {
                                + [ '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 );
@@ -1233,7 +1235,7 @@ class ParserTestRunner {
                        $tables[] = 'image_comment_temp';
                }
 
-               if ( $wgActorTableSchemaMigrationStage >= MIGRATION_WRITE_BOTH ) {
+               if ( $wgActorTableSchemaMigrationStage & SCHEMA_COMPAT_WRITE_NEW ) {
                        // The new tables for actors are in use
                        $tables[] = 'actor';
                        $tables[] = 'revision_actor_temp';
@@ -1393,7 +1395,17 @@ class ParserTestRunner {
                                '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 );