summaryrefslogtreecommitdiff
path: root/vendor/symfony/console/Tests/Helper/ProcessHelperTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/symfony/console/Tests/Helper/ProcessHelperTest.php')
-rw-r--r--vendor/symfony/console/Tests/Helper/ProcessHelperTest.php21
1 files changed, 11 insertions, 10 deletions
diff --git a/vendor/symfony/console/Tests/Helper/ProcessHelperTest.php b/vendor/symfony/console/Tests/Helper/ProcessHelperTest.php
index a51fb435..eb619539 100644
--- a/vendor/symfony/console/Tests/Helper/ProcessHelperTest.php
+++ b/vendor/symfony/console/Tests/Helper/ProcessHelperTest.php
@@ -11,13 +11,14 @@
namespace Symfony\Component\Console\Tests\Helper;
+use PHPUnit\Framework\TestCase;
use Symfony\Component\Console\Helper\DebugFormatterHelper;
use Symfony\Component\Console\Helper\HelperSet;
use Symfony\Component\Console\Output\StreamOutput;
use Symfony\Component\Console\Helper\ProcessHelper;
use Symfony\Component\Process\Process;
-class ProcessHelperTest extends \PHPUnit_Framework_TestCase
+class ProcessHelperTest extends TestCase
{
/**
* @dataProvider provideCommandsAndOutput
@@ -46,35 +47,35 @@ class ProcessHelperTest extends \PHPUnit_Framework_TestCase
public function provideCommandsAndOutput()
{
- $successOutputVerbose = <<<EOT
+ $successOutputVerbose = <<<'EOT'
RUN php -r "echo 42;"
RES Command ran successfully
EOT;
- $successOutputDebug = <<<EOT
+ $successOutputDebug = <<<'EOT'
RUN php -r "echo 42;"
OUT 42
RES Command ran successfully
EOT;
- $successOutputDebugWithTags = <<<EOT
+ $successOutputDebugWithTags = <<<'EOT'
RUN php -r "echo '<info>42</info>';"
OUT <info>42</info>
RES Command ran successfully
EOT;
- $successOutputProcessDebug = <<<EOT
+ $successOutputProcessDebug = <<<'EOT'
RUN 'php' '-r' 'echo 42;'
OUT 42
RES Command ran successfully
EOT;
- $syntaxErrorOutputVerbose = <<<EOT
+ $syntaxErrorOutputVerbose = <<<'EOT'
RUN php -r "fwrite(STDERR, 'error message');usleep(50000);fwrite(STDOUT, 'out message');exit(252);"
RES 252 Command did not run successfully
EOT;
- $syntaxErrorOutputDebug = <<<EOT
+ $syntaxErrorOutputDebug = <<<'EOT'
RUN php -r "fwrite(STDERR, 'error message');usleep(500000);fwrite(STDOUT, 'out message');exit(252);"
ERR error message
OUT out message
@@ -83,9 +84,9 @@ EOT;
EOT;
$errorMessage = 'An error occurred';
- if ('\\' === DIRECTORY_SEPARATOR) {
- $successOutputProcessDebug = str_replace("'", '"', $successOutputProcessDebug);
- }
+ $args = new Process(array('php', '-r', 'echo 42;'));
+ $args = $args->getCommandLine();
+ $successOutputProcessDebug = str_replace("'php' '-r' 'echo 42;'", $args, $successOutputProcessDebug);
return array(
array('', 'php -r "echo 42;"', StreamOutput::VERBOSITY_VERBOSE, null),