Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit de1ba1c

Browse filesBrowse 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
Copy full SHA for de1ba1c

File tree

Expand file treeCollapse file tree

1 file changed

+4
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-3
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Tests/Helper/ProcessHelperTest.php
+4-3Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.