public function ProcessBuilderTest::testShouldEscapeArguments in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/process/Tests/ProcessBuilderTest.php \Symfony\Component\Process\Tests\ProcessBuilderTest::testShouldEscapeArguments()
File
- vendor/
symfony/ process/ Tests/ ProcessBuilderTest.php, line 139
Class
Namespace
Symfony\Component\Process\TestsCode
public function testShouldEscapeArguments() {
$pb = new ProcessBuilder(array(
'%path%',
'foo " bar',
'%baz%baz',
));
$proc = $pb
->getProcess();
if ('\\' === DIRECTORY_SEPARATOR) {
$this
->assertSame('^%"path"^% "foo \\" bar" "%baz%baz"', $proc
->getCommandLine());
}
else {
$this
->assertSame("'%path%' 'foo \" bar' '%baz%baz'", $proc
->getCommandLine());
}
}