File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -277,9 +277,9 @@ public function pool(callable $callback)
277
277
* @param callable $callback
278
278
* @return \Illuminate\Process\Pipe
279
279
*/
280
- public function pipe (callable $ callback )
280
+ public function pipe (callable $ callback, ? callable $ output = null )
281
281
{
282
- return new Pipe ($ this , $ callback );
282
+ return ( new Pipe ($ this , $ callback))-> run (output: $ output );
283
283
}
284
284
285
285
/**
Original file line number Diff line number Diff line change @@ -512,7 +512,7 @@ public function testProcessPipe()
512
512
$ pipe ->command ('grep -i "foo" ' );
513
513
});
514
514
515
- $ this ->assertSame ("foo \n" , $ pipe ->run ()-> output ());
515
+ $ this ->assertSame ("foo \n" , $ pipe ->output ());
516
516
}
517
517
518
518
public function testProcessPipeFailed ()
@@ -531,7 +531,7 @@ public function testProcessPipeFailed()
531
531
$ pipe ->command ('grep -i "foo" ' );
532
532
});
533
533
534
- $ this ->assertTrue ($ pipe ->run ()-> failed ());
534
+ $ this ->assertTrue ($ pipe ->failed ());
535
535
}
536
536
537
537
public function testFakeInvokedProcessOutputWithLatestOutput ()
You can’t perform that action at this time.
0 commit comments