File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ class Process implements \IteratorAggregate
5353 private $ hasCallback = false ;
5454 private $ commandline ;
5555 private $ cwd ;
56- private $ env ;
56+ private $ env = [] ;
5757 private $ input ;
5858 private $ starttime ;
5959 private $ lastOutputTime ;
Original file line number Diff line number Diff line change @@ -1505,8 +1505,11 @@ public function testPreparedCommandWithNoValues()
15051505
15061506 public function testEnvArgument ()
15071507 {
1508- $ env = ['FOO ' => 'Foo ' , 'BAR ' => 'Bar ' ];
15091508 $ cmd = '\\' === \DIRECTORY_SEPARATOR ? 'echo !FOO! !BAR! !BAZ! ' : 'echo $FOO $BAR $BAZ ' ;
1509+ $ p = Process::fromShellCommandline ($ cmd );
1510+ $ this ->assertSame ([], $ p ->getEnv ());
1511+
1512+ $ env = ['FOO ' => 'Foo ' , 'BAR ' => 'Bar ' ];
15101513 $ p = Process::fromShellCommandline ($ cmd , null , $ env );
15111514 $ p ->run (null , ['BAR ' => 'baR ' , 'BAZ ' => 'baZ ' ]);
15121515
You can’t perform that action at this time.
0 commit comments