You are here

public function ProcessBuilderTest::testAddEnvironmentVariables in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/process/Tests/ProcessBuilderTest.php \Symfony\Component\Process\Tests\ProcessBuilderTest::testAddEnvironmentVariables()

File

vendor/symfony/process/Tests/ProcessBuilderTest.php, line 33

Class

ProcessBuilderTest

Namespace

Symfony\Component\Process\Tests

Code

public function testAddEnvironmentVariables() {
  $pb = new ProcessBuilder();
  $env = array(
    'foo' => 'bar',
    'foo2' => 'bar2',
  );
  $proc = $pb
    ->add('command')
    ->setEnv('foo', 'bar2')
    ->addEnvironmentVariables($env)
    ->inheritEnvironmentVariables(false)
    ->getProcess();
  $this
    ->assertSame($env, $proc
    ->getEnv());
}