mirror of
https://github.com/danog/process.git
synced 2024-12-02 09:37:55 +01:00
Fix testProcessEnvIsValid on Windows
This commit is contained in:
parent
f7f0931a7d
commit
94479ce058
@ -124,10 +124,12 @@ class ProcessTest extends TestCase {
|
|||||||
public function testProcessEnvIsValid() {
|
public function testProcessEnvIsValid() {
|
||||||
Loop::run(function () {
|
Loop::run(function () {
|
||||||
$process = new Process(self::CMD_PROCESS, null, [
|
$process = new Process(self::CMD_PROCESS, null, [
|
||||||
'env_name' => 'env_value'
|
'test' => 'foobar',
|
||||||
|
'PATH' => \getenv('PATH'),
|
||||||
|
'SystemRoot' => \getenv('SystemRoot') ?: '', // required on Windows for process wrapper
|
||||||
]);
|
]);
|
||||||
$process->start();
|
$process->start();
|
||||||
$this->assertSame('env_value', $process->getEnv()['env_name']);
|
$this->assertSame('foobar', $process->getEnv()['test']);
|
||||||
yield $process->join();
|
yield $process->join();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user