diff --git a/src/Symfony/Component/Process/Tests/ProcessTest.php b/src/Symfony/Component/Process/Tests/ProcessTest.php index 6b525d2684..62bffec88f 100644 --- a/src/Symfony/Component/Process/Tests/ProcessTest.php +++ b/src/Symfony/Component/Process/Tests/ProcessTest.php @@ -476,6 +476,10 @@ class ProcessTest extends TestCase $this->markTestSkipped('Windows does not have /dev/tty support'); } + if (!Process::isTtySupported()) { + $this->markTestSkipped('There is no TTY support'); + } + $process = $this->getProcess('echo "foo" >> /dev/null && '.$this->getProcessForCode('usleep(100000);')->getCommandLine()); $process->setTty(true); $process->start(); @@ -491,6 +495,10 @@ class ProcessTest extends TestCase $this->markTestSkipped('Windows does have /dev/tty support'); } + if (!Process::isTtySupported()) { + $this->markTestSkipped('There is no TTY support'); + } + $process = $this->getProcess('echo "foo" >> /dev/null'); $process->setTty(true); $process->run(); @@ -1433,16 +1441,7 @@ class ProcessTest extends TestCase $p = Process::fromShellCommandline(sprintf('"%s" -r %s "a" "" "b"', self::$phpBin, escapeshellarg('print_r($argv);'))); $p->run(); - $expected = << - - [1] => a - [2] => - [3] => b -) - -EOTXT; + $expected = "Array\n(\n [0] => -\n [1] => a\n [2] => \n [3] => b\n)\n"; $this->assertSame($expected, str_replace('Standard input code', '-', $p->getOutput())); }