8000 [Process] Adjust PR #11264, make it Windows compatible and fix CS · romainneutron/symfony@cec0a45 · GitHub 8000
[go: up one dir, main page]

Skip to content

Commit cec0a45

Browse files
committed
[Process] Adjust PR symfony#11264, make it Windows compatible and fix CS
1 parent 9e1ea4a commit cec0a45

File t FD07 ree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/Symfony/Component/Process/Tests/AbstractProcessTest.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,15 @@ public function testGetIncrementalOutput()
287287
}
288288
}
289289

290-
public function testZeroAsOutput(){
291-
$p = $this->getProcess('printf 0');
290+
public function testZeroAsOutput()
291+
{
292+
if (defined('PHP_WINDOWS_VERSION_BUILD')) {
293+
// see http://stackoverflow.com/questions/7105433/windows-batch-echo-without-new-line
294+
$p = $this->getProcess('echo | set /p dummyName=0');
295+
} else {
296+
$p = $this->getProcess('printf 0');
297+
}
298+
292299
$p->run();
293300
$this->assertSame('0', $p->getOutput());
294301
}

0 commit comments

Comments
 (0)
0