merging latest master
[lhc/web/wiklou.git] / tests / phpunit / includes / parser / NewParserTest.php
index 11f9471..ff6e472 100644 (file)
@@ -186,7 +186,7 @@ class NewParserTest extends MediaWikiTestCase {
                if ( !$this->db->selectField( 'image', '1', array( 'img_name' => $image->getName() ) ) ) {
                        $image->recordUpload2(
                                '', // archive name
-                               'Upload of some lame file', 
+                               'Upload of some lame file',
                                'Some lame file',
                                array(
                                        'size'        => 12345,
@@ -197,7 +197,7 @@ class NewParserTest extends MediaWikiTestCase {
                                        'mime'        => 'image/jpeg',
                                        'metadata'    => serialize( array() ),
                                        'sha1'        => wfBaseConvert( '', 16, 36, 31 ),
-                                       'fileExists'  => true ), 
+                                       'fileExists'  => true ),
                                $this->db->timestamp( '20010115123500' ), $user
                        );
                }
@@ -207,8 +207,8 @@ class NewParserTest extends MediaWikiTestCase {
                if ( !$this->db->selectField( 'image', '1', array( 'img_name' => $image->getName() ) ) ) {
                        $image->recordUpload2(
                                '', // archive name
-                               'zomgnotcensored', 
-                               'Borderline image', 
+                               'zomgnotcensored',
+                               'Borderline image',
                                array(
                                        'size'        => 12345,
                                        'width'       => 320,
@@ -218,7 +218,7 @@ class NewParserTest extends MediaWikiTestCase {
                                        'mime'        => 'image/jpeg',
                                        'metadata'    => serialize( array() ),
                                        'sha1'        => wfBaseConvert( '', 16, 36, 31 ),
-                                       'fileExists'  => true ), 
+                                       'fileExists'  => true ),
                                $this->db->timestamp( '20010115123500' ), $user
                        );
                }
@@ -345,6 +345,9 @@ class NewParserTest extends MediaWikiTestCase {
 
                $this->savedGlobals = array();
 
+               /** @since 1.20 */
+               wfRunHooks( 'ParserTestGlobals', array( &$settings ) );
+
                foreach ( $settings as $var => $val ) {
                        if ( array_key_exists( $var, $GLOBALS ) ) {
                                $this->savedGlobals[$var] = $GLOBALS[$var];
@@ -380,7 +383,7 @@ class NewParserTest extends MediaWikiTestCase {
                # The entries saved into RepoGroup cache with previous globals will be wrong.
                RepoGroup::destroySingleton();
                FileBackendGroup::destroySingleton();
-               MessageCache::singleton()->destroyInstance();
+               MessageCache::destroyInstance();
 
                return $context;
        }