Merge "Add invalidateUserSessions.php maintenance script"
[lhc/web/wiklou.git] / tests / phpunit / includes / parser / NewParserTest.php
index 695f99a..8512572 100644 (file)
@@ -94,13 +94,12 @@ class NewParserTest extends MediaWikiTestCase {
                $tmpGlobals['wgParserCacheType'] = CACHE_NONE;
                $tmpGlobals['wgCapitalLinks'] = true;
                $tmpGlobals['wgNoFollowLinks'] = true;
-               $tmpGlobals['wgNoFollowDomainExceptions'] = [];
+               $tmpGlobals['wgNoFollowDomainExceptions'] = [ 'no-nofollow.org' ];
                $tmpGlobals['wgExternalLinkTarget'] = false;
                $tmpGlobals['wgThumbnailScriptPath'] = false;
                $tmpGlobals['wgUseImageResize'] = true;
                $tmpGlobals['wgAllowExternalImages'] = true;
                $tmpGlobals['wgRawHtml'] = false;
-               $tmpGlobals['wgWellFormedXml'] = true;
                $tmpGlobals['wgExperimentalHtmlIds'] = false;
                $tmpGlobals['wgAdaptiveMessageCache'] = true;
                $tmpGlobals['wgUseDatabaseMessages'] = true;
@@ -325,7 +324,21 @@ class NewParserTest extends MediaWikiTestCase {
                        ], $this->db->timestamp( '20010115123500' ), $user );
                }
 
-               # A DjVu file
+               $image = wfLocalFile( Title::makeTitle( NS_FILE, 'Audio.oga' ) );
+               if ( !$this->db->selectField( 'image', '1', [ 'img_name' => $image->getName() ] ) ) {
+                       $image->recordUpload2( '', 'An awesome hitsong ', 'Will it play', [
+                                       'size'        => 12345,
+                                       'width'       => 0,
+                                       'height'      => 0,
+                                       'bits'        => 0,
+                                       'media_type'  => MEDIATYPE_AUDIO,
+                                       'mime'        => 'application/ogg',
+                                       'metadata'    => serialize( [] ),
+                                       'sha1'        => Wikimedia\base_convert( '', 16, 36, 32 ),
+                                       'fileExists'  => true
+                       ], $this->db->timestamp( '20010115123500' ), $user );
+               }
+
                # A DjVu file
                $image = wfLocalFile( Title::makeTitle( NS_FILE, 'LoremIpsum.djvu' ) );
                if ( !$this->db->selectField( 'image', '1', [ 'img_name' => $image->getName() ] ) ) {
@@ -436,7 +449,6 @@ class NewParserTest extends MediaWikiTestCase {
                        'wgThumbLimits' => [ self::getOptionValue( 'thumbsize', $opts, 180 ) ],
                        'wgMaxTocLevel' => $maxtoclevel,
                        'wgUseTeX' => isset( $opts['math'] ) || isset( $opts['texvc'] ),
-                       'wgWellFormedXml' => true,
                        'wgMathDirectory' => $uploadDir . '/math',
                        'wgDefaultLanguageVariant' => $variant,
                        'wgLinkHolderBatchSize' => $linkHolderBatchSize,