@@ -1463,23 +1463,23 @@ public function provideEscapeArgument()
14631463
14641464 public function testPreparedCommand ()
14651465 {
1466- $ p = Process::fromShellCommandline ('echo "$abc"DEF ' );
1466+ $ p = Process::fromShellCommandline ('echo "${: abc} "DEF ' );
14671467 $ p ->run (null , ['abc ' => 'ABC ' ]);
14681468
14691469 $ this ->assertSame ('ABCDEF ' , rtrim ($ p ->getOutput ()));
14701470 }
14711471
14721472 public function testPreparedCommandMulti ()
14731473 {
1474- $ p = Process::fromShellCommandline ('echo "$abc""$def" ' );
1474+ $ p = Process::fromShellCommandline ('echo "${: abc} ""${: def} " ' );
14751475 $ p ->run (null , ['abc ' => 'ABC ' , 'def ' => 'DEF ' ]);
14761476
14771477 $ this ->assertSame ('ABCDEF ' , rtrim ($ p ->getOutput ()));
14781478 }
14791479
14801480 public function testPreparedCommandWithQuoteInIt ()
14811481 {
1482- $ p = Process::fromShellCommandline ('php -r "$code" "$def" ' );
1482+ $ p = Process::fromShellCommandline ('php -r "${: code} " "${: def} " ' );
14831483 $ p ->run (null , ['code ' => 'echo $argv[1]; ' , 'def ' => '"DEF" ' ]);
14841484
14851485 $ this ->assertSame ('"DEF" ' , rtrim ($ p ->getOutput ()));
@@ -1488,16 +1488,16 @@ public function testPreparedCommandWithQuoteInIt()
14881488 public function testPreparedCommandWithMissingValue ()
14891489 {
14901490 $ this ->expectException ('Symfony\Component\Process\Exception\InvalidArgumentException ' );
1491- $ this ->expectExceptionMessage ('Command line is missing a value for key "$ abc": echo "$abc". ' );
1492- $ p = Process::fromShellCommandline ('echo "$abc" ' );
1491+ $ this ->expectExceptionMessage ('Command line is missing a value for parameter " abc": echo "${: abc} ". ' );
1492+ $ p = Process::fromShellCommandline ('echo "${: abc} " ' );
14931493 $ p ->run (null , ['bcd ' => 'BCD ' ]);
14941494 }
14951495
14961496 public function testPreparedCommandWithNoValues ()
14971497 {
14981498 $ this ->expectException ('Symfony\Component\Process\Exception\InvalidArgumentException ' );
1499- $ this ->expectExceptionMessage ('Command line is missing a value for key "$ abc": echo "$abc". ' );
1500- $ p = Process::fromShellCommandline ('echo "$abc" ' );
1499+ $ this ->expectExceptionMessage ('Command line is missing a value for parameter " abc": echo "${: abc} ". ' );
1500+ $ p = Process::fromShellCommandline ('echo "${: abc} " ' );
15011501 $ p ->run (null , []);
15021502 }
15031503
0 commit comments