File tree 2 files changed +5
-2
lines changed
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
53
53
private $ hasCallback = false ;
54
54
private $ commandline ;
55
55
private $ cwd ;
56
- private $ env ;
56
+ private $ env = [] ;
57
57
private $ input ;
58
58
private $ starttime ;
59
59
private $ lastOutputTime ;
Original file line number Diff line number Diff line change @@ -1505,8 +1505,11 @@ public function testPreparedCommandWithNoValues()
1505
1505
1506
1506
public function testEnvArgument ()
1507
1507
{
1508
- $ env = ['FOO ' => 'Foo ' , 'BAR ' => 'Bar ' ];
1509
1508
$ 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 ' ];
1510
1513
$ p = Process::fromShellCommandline ($ cmd , null , $ env );
1511
1514
$ p ->run (null , ['BAR ' => 'baR ' , 'BAZ ' => 'baZ ' ]);
1512
1515
You can’t perform that action at this time.
0 commit comments