public function ProcessBuilderTest::testPrefixIsPrependedToAllGeneratedProcess in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/process/Tests/ProcessBuilderTest.php \Symfony\Component\Process\Tests\ProcessBuilderTest::testPrefixIsPrependedToAllGeneratedProcess()
File
- vendor/
symfony/ process/ Tests/ ProcessBuilderTest.php, line 99
Class
Namespace
Symfony\Component\Process\TestsCode
public function testPrefixIsPrependedToAllGeneratedProcess() {
$pb = new ProcessBuilder();
$pb
->setPrefix('/usr/bin/php');
$proc = $pb
->setArguments(array(
'-v',
))
->getProcess();
if ('\\' === DIRECTORY_SEPARATOR) {
$this
->assertEquals('"/usr/bin/php" "-v"', $proc
->getCommandLine());
}
else {
$this
->assertEquals("'/usr/bin/php' '-v'", $proc
->getCommandLine());
}
$proc = $pb
->setArguments(array(
'-i',
))
->getProcess();
if ('\\' === DIRECTORY_SEPARATOR) {
$this
->assertEquals('"/usr/bin/php" "-i"', $proc
->getCommandLine());
}
else {
$this
->assertEquals("'/usr/bin/php' '-i'", $proc
->getCommandLine());
}
}