public function ProcessBuilderTest::testShouldEscapeArgumentsAndPrefix

File

drupal/core/vendor/symfony/process/Symfony/Component/Process/Tests/ProcessBuilderTest.php, line 139

Class

ProcessBuilderTest

Namespace

Symfony\Component\Process\Tests

Code

public function testShouldEscapeArgumentsAndPrefix() {
  $pb = new ProcessBuilder(array(
    'arg',
  ));
  $pb
    ->setPrefix('%prefix%');
  $proc = $pb
    ->getProcess();
  if (defined('PHP_WINDOWS_VERSION_BUILD')) {
    $this
      ->assertSame('^%"prefix"^% "arg"', $proc
      ->getCommandLine());
  }
  else {
    $this
      ->assertSame("'%prefix%' 'arg'", $proc
      ->getCommandLine());
  }
}