Skip to content

Commit 9feb4e5

Browse files
authored
Merge pull request #879 from PHPCSStandards/feature/escapeshellcmd-test-fix-data-provider
EscapeshellcmdTest: fix up data provider
2 parents b24a950 + 5efe477 commit 9feb4e5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/Core/Util/Common/EscapeshellcmdTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,27 +59,27 @@ public static function dataEscapeshellcmd()
5959
{
6060
return [
6161
'Command is empty string' => [
62-
'text' => '',
62+
'command' => '',
6363
'expected' => '',
6464
],
6565
'Command is simple string' => [
66-
'text' => 'csslint',
66+
'command' => 'csslint',
6767
'expected' => 'csslint',
6868
],
6969
'Command containing characters which PHP escapes' => [
70-
'text' => '&#;`|*?~<>^()[]{}$\,%!',
70+
'command' => '&#;`|*?~<>^()[]{}$\,%!',
7171
'expected' => '\&\#\;\`\|\*\?\~\<\>\^\(\)\[\]\{\}\$\\\\,%!',
7272
'expectedWin' => '^&^#^;^`^|^*^?^~^<^>^^^(^)^[^]^{^}^$^\,^%^!',
7373
],
7474
// @link https://github.com/squizlabs/PHP_CodeSniffer/pull/3214
7575
'Command containing spaces, which can cause problems on Windows' => [
76-
'text' => 'C:\Program Files\nodejs\csslint.cmd',
76+
'command' => 'C:\Program Files\nodejs\csslint.cmd',
7777
'expected' => 'C:\\\\Program Files\\\\nodejs\\\\csslint.cmd',
7878
'expectedWin' => 'C:^\Program^ Files^\nodejs^\csslint.cmd',
7979
],
8080
// @link https://github.com/php/doc-en/pull/511
8181
'Command containing spaces with additional arguments' => [
82-
'text' => 'php -f ./~home/path to/file.php',
82+
'command' => 'php -f ./~home/path to/file.php',
8383
'expected' => 'php -f ./\~home/path to/file.php',
8484
'expectedWin' => 'php^ -f^ ./^~home/path^ to/file.php',
8585
],

0 commit comments

Comments
 (0)