Use 'rsvg-convert' binary rather than 'rsvg' everywhere
[lhc/web/wiklou.git] / tests / phpunit / includes / parser / NewParserTest.php
index 4e8c11f..713c32d 100644 (file)
@@ -124,7 +124,7 @@ class NewParserTest extends MediaWikiTestCase {
                $tmpGlobals['wgFileExtensions'][] = 'svg';
                $tmpGlobals['wgSVGConverter'] = 'rsvg';
                $tmpGlobals['wgSVGConverters']['rsvg'] =
-                       '$path/rsvg-convert -w $width -h $height $input -o $output';
+                       '$path/rsvg-convert -w $width -h $height -o $output $input';
 
                if ( $GLOBALS['wgStyleDirectory'] === false ) {
                        $tmpGlobals['wgStyleDirectory'] = "$IP/skins";
@@ -353,6 +353,9 @@ class NewParserTest extends MediaWikiTestCase {
        /**
         * Set up the global variables for a consistent environment for each test.
         * Ideally this should replace the global configuration entirely.
+        * @param array $opts
+        * @param string $config
+        * @return RequestContext
         */
        protected function setupGlobals( $opts = array(), $config = '' ) {
                global $wgFileBackends;
@@ -431,7 +434,7 @@ class NewParserTest extends MediaWikiTestCase {
                $this->savedGlobals = array();
 
                /** @since 1.20 */
-               wfRunHooks( 'ParserTestGlobals', array( &$settings ) );
+               Hooks::run( 'ParserTestGlobals', array( &$settings ) );
 
                $langObj = Language::factory( $lang );
                $settings['wgContLang'] = $langObj;
@@ -754,7 +757,7 @@ class NewParserTest extends MediaWikiTestCase {
                                        $this->markTestSkipped( "SKIPPED: tidy extension is not installed.\n" );
                                } else {
                                        $out = MWTidy::tidy( $out );
-                                       $out = preg_replace( '/\s+$/', '', $out);
+                                       $out = preg_replace( '/\s+$/', '', $out );
                                }
                        }
 
@@ -872,6 +875,7 @@ class NewParserTest extends MediaWikiTestCase {
        /**
         * Get an input dictionary from a set of parser test files
         * @param array $filenames
+        * @return string
         */
        function getFuzzInput( $filenames ) {
                $dict = '';
@@ -890,6 +894,7 @@ class NewParserTest extends MediaWikiTestCase {
 
        /**
         * Get a memory usage breakdown
+        * @return array
         */
        function getMemoryBreakdown() {
                $memStats = array();
@@ -926,6 +931,7 @@ class NewParserTest extends MediaWikiTestCase {
        /**
         * Get a Parser object
         * @param Preprocessor $preprocessor
+        * @return Parser
         */
        function getParser( $preprocessor = null ) {
                global $wgParserConf;
@@ -933,7 +939,7 @@ class NewParserTest extends MediaWikiTestCase {
                $class = $wgParserConf['class'];
                $parser = new $class( array( 'preprocessorClass' => $preprocessor ) + $wgParserConf );
 
-               wfRunHooks( 'ParserTestParser', array( &$parser ) );
+               Hooks::run( 'ParserTestParser', array( &$parser ) );
 
                return $parser;
        }
@@ -986,6 +992,7 @@ class NewParserTest extends MediaWikiTestCase {
        /**
         * Remove last character if it is a newline
         * @param string $s
+        * @return string
         */
        public function removeEndingNewline( $s ) {
                if ( substr( $s, -1 ) === "\n" ) {
@@ -1070,6 +1077,7 @@ class NewParserTest extends MediaWikiTestCase {
         * @param string $key Name of option val to retrieve
         * @param array $opts Options array to look in
         * @param mixed $default Default value returned if not found
+        * @return mixed
         */
        protected static function getOptionValue( $key, $opts, $default ) {
                $key = strtolower( $key );