From 9eefeaed6db4b5ada1eb8c7083055200603825b0 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Tue, 3 Mar 2015 22:15:52 -0800 Subject: [PATCH] Remove unused alias/layer of test abstraction wfShellMaintenanceCmd() Change-Id: I28d303f9b89ffad052d06eb2dbb9e6f8cfaeea24 --- includes/GlobalFunctions.php | 9 --------- tests/phpunit/includes/GlobalFunctions/GlobalTest.php | 10 +++++----- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 3f1062054c..1d44038f5e 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -3019,15 +3019,6 @@ function wfInitShellLocale() { } } -/** - * Alias to wfShellWikiCmd() - * - * @see wfShellWikiCmd() - */ -function wfShellMaintenanceCmd( $script, array $parameters = array(), array $options = array() ) { - return wfShellWikiCmd( $script, $parameters, $options ); -} - /** * Generate a shell-escaped command line string to run a MediaWiki cli script. * Note that $parameters should be a flat array and an option with an argument diff --git a/tests/phpunit/includes/GlobalFunctions/GlobalTest.php b/tests/phpunit/includes/GlobalFunctions/GlobalTest.php index 331fb3ba4f..dcafb73954 100644 --- a/tests/phpunit/includes/GlobalFunctions/GlobalTest.php +++ b/tests/phpunit/includes/GlobalFunctions/GlobalTest.php @@ -691,21 +691,21 @@ class GlobalTest extends MediaWikiTestCase { } /** - * @dataProvider provideWfShellMaintenanceCmdList - * @covers ::wfShellMaintenanceCmd + * @dataProvider provideWfShellWikiCmdList + * @covers ::wfShellWikiCmd */ - public function testWfShellMaintenanceCmd( $script, $parameters, $options, + public function testWfShellWikiCmd( $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 ); + $actual = wfShellWikiCmd( $script, $parameters, $options ); $this->assertEquals( $expected, $actual, $description ); } - public static function provideWfShellMaintenanceCmdList() { + public static function provideWfShellWikiCmdList() { global $wgPhpCli; return array( -- 2.20.1