@@ -166,15 +166,15 @@ public function testCallbackIsExecutedForOutput()
166
166
167
167
public function testGetErrorOutput ()
168
168
{
169
- $ p = new Process (sprintf ('php -r %s ' , escapeshellarg ('$n = 0; while ($n < 3) { file_put_contents( \'php://stderr \', \'ERROR \'); $n++; } ' )));
169
+ $ p = $ this -> getProcess (sprintf ('php -r %s ' , escapeshellarg ('$n = 0; while ($n < 3) { file_put_contents( \'php://stderr \', \'ERROR \'); $n++; } ' )));
170
170
171
171
$ p ->run ();
172
172
$ this ->assertEquals (3 , preg_match_all ('/ERROR/ ' , $ p ->getErrorOutput (), $ matches ));
173
173
}
174
174
175
175
public function testGetIncrementalErrorOutput ()
176
176
{
177
- $ p = new Process (sprintf ('php -r %s ' , escapeshellarg ('$n = 0; while ($n < 3) { usleep(50000); file_put_contents( \'php://stderr \', \'ERROR \'); $n++; } ' )));
177
+ $ p = $ this -> getProcess (sprintf ('php -r %s ' , escapeshellarg ('$n = 0; while ($n < 3) { usleep(50000); file_put_contents( \'php://stderr \', \'ERROR \'); $n++; } ' )));
178
178
179
179
$ p ->start ();
180
180
while ($ p ->isRunning ()) {
@@ -185,15 +185,15 @@ public function testGetIncrementalErrorOutput()
185
185
186
186
public function testGetOutput ()
187
187
{
188
- $ p = new Process (sprintf ('php -r %s ' , escapeshellarg ('$n=0;while ($n<3) {echo \' foo \';$n++; usleep(500); } ' )));
188
+ $ p = $ this -> getProcess (sprintf ('php -r %s ' , escapeshellarg ('$n=0;while ($n<3) {echo \' foo \';$n++; usleep(500); } ' )));
189
189
190
190
$ p ->run ();
191
191
$ this ->assertEquals (3 , preg_match_all ('/foo/ ' , $ p ->getOutput (), $ matches ));
192
192
}
193
193
194
194
public function testGetIncrementalOutput ()
195
195
{
196
- $ p = new Process (sprintf ('php -r %s ' , escapeshellarg ('$n=0;while ($n<3) { echo \' foo \'; usleep(50000); $n++; } ' )));
196
+ $ p = $ this -> getProcess (sprintf ('php -r %s ' , escapeshellarg ('$n=0;while ($n<3) { echo \' foo \'; usleep(50000); $n++; } ' )));
197
197
198
198
$ p ->start ();
199
199
while ($ p ->isRunning ()) {
0 commit comments