8000 minor #21477 [Console] Fix too strict test (nicolas-grekas) · symfony/symfony@de1ba1c · GitHub
[go: up one dir, main page]

Skip to content

Commit de1ba1c

Browse files
committed
minor #21477 [Console] Fix too strict test (nicolas-grekas)
This PR was merged into the 2.7 branch. Discussion ---------- [Console] Fix too strict test | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - required to make #21474 green in cross versions tests Commits ------- ee4b3e2 [Console] Fix too strict test
2 parents a1dedef + ee4b3e2 commit de1ba1c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Symfony/Component/Console/Tests/Helper/ProcessHelperTest.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use Symfony\Component\Console\Output\StreamOutput;
1717
use Symfony\Component\Console\Helper\ProcessHelper;
1818
use Symfony\Component\Process\Process;
19+
use Symfony\Component\Process\ProcessBuilder;
1920

2021
class ProcessHelperTest extends \PHPUnit_Framework_TestCase
2122
{
@@ -83,9 +84,9 @@ public function provideCommandsAndOutput()
8384
EOT;
8485

8586
$errorMessage = 'An error occurred';
86-
if ('\\' === DIRECTORY_SEPARATOR) {
87-
$successOutputProcessDebug = str_replace("'", '"', $successOutputProcessDebug);
88-
}
87+
$args = new ProcessBuilder(array('php', '-r', 'echo 42;'));
88+
$args = $args->getProcess()->getCommandLine();
89+
$successOutputProcessDebug = str_replace("'php' '-r' 'echo 42;'", $args, $successOutputProcessDebug);
8990

9091
return array(
9192
array('', 'php -r "echo 42;"', StreamOutput::VERBOSITY_VERBOSE, null),

0 commit comments

Comments
 (0)
0