public function ProcessBuilderTest::testInheritEnvironmentVars in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/process/Tests/ProcessBuilderTest.php \Symfony\Component\Process\Tests\ProcessBuilderTest::testInheritEnvironmentVars()
File
- vendor/
symfony/ process/ Tests/ ProcessBuilderTest.php, line 18
Class
Namespace
Symfony\Component\Process\TestsCode
public function testInheritEnvironmentVars() {
$_ENV['MY_VAR_1'] = 'foo';
$proc = ProcessBuilder::create()
->add('foo')
->getProcess();
unset($_ENV['MY_VAR_1']);
$env = $proc
->getEnv();
$this
->assertArrayHasKey('MY_VAR_1', $env);
$this
->assertEquals('foo', $env['MY_VAR_1']);
}