http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97963

Revision: 97963
Author:   brion
Date:     2011-09-23 22:17:41 +0000 (Fri, 23 Sep 2011)
Log Message:
-----------
Followup r97954: fix unit tests for wfShellMaintenanceCmd() to work on Unix as 
well as Windows

Modified Paths:
--------------
    trunk/phase3/tests/phpunit/includes/GlobalFunctions/GlobalTest.php

Modified: trunk/phase3/tests/phpunit/includes/GlobalFunctions/GlobalTest.php
===================================================================
--- trunk/phase3/tests/phpunit/includes/GlobalFunctions/GlobalTest.php  
2011-09-23 22:17:10 UTC (rev 97962)
+++ trunk/phase3/tests/phpunit/includes/GlobalFunctions/GlobalTest.php  
2011-09-23 22:17:41 UTC (rev 97963)
@@ -909,6 +909,10 @@
         * @dataProvider provideWfShellMaintenanceCmdList
         */
        function testWfShellMaintenanceCmd( $script, $parameters, $options, 
$expected, $description ) {
+               if( wfIsWindows() ) {
+                       // Approximation that's good enough for our purposes 
just now
+                       $expected = str_replace( "'", '"', $expected );
+               }
                $actual = wfShellMaintenanceCmd( $script, $parameters, $options 
);
                $this->assertEquals( $expected, $actual, $description );
        }
@@ -917,16 +921,16 @@
                global $wgPhpCli;
                return array(
                        array( 'eval.php', array( '--help', '--test' ), array(),
-                               "\"$wgPhpCli\" \"eval.php\" \"--help\" 
\"--test\"",
+                               "'$wgPhpCli' 'eval.php' '--help' '--test'",
                                "Called eval.php --help --test" ),
                        array( 'eval.php', array( '--help', '--test space' ), 
array('php' => 'php5'),
-                               "\"php5\" \"eval.php\" \"--help\" \"--test 
space\"",
+                               "'php5' 'eval.php' '--help' '--test space'",
                                "Called eval.php --help --test with php option" 
),
                        array( 'eval.php', array( '--help', '--test', 'X' ), 
array('wrapper' => 'MWScript.php'),
-                               "\"$wgPhpCli\" \"MWScript.php\" \"eval.php\" 
\"--help\" \"--test\" \"X\"",
+                               "'$wgPhpCli' 'MWScript.php' 'eval.php' '--help' 
'--test' 'X'",
                                "Called eval.php --help --test with wrapper 
option" ),
                        array( 'eval.php', array( '--help', '--test', 'y' ), 
array('php' => 'php5', 'wrapper' => 'MWScript.php'),
-                               "\"php5\" \"MWScript.php\" \"eval.php\" 
\"--help\" \"--test\" \"y\"",
+                               "'php5' 'MWScript.php' 'eval.php' '--help' 
'--test' 'y'",
                                "Called eval.php --help --test with wrapper and 
php option" ),
                );
        }


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to