How to write the output of an Asynchronous process to the file. I have the following code in my phpunit bootstrap file:
$command = 'exec php ' . $kernel->getRootDir() . '/console '
. 'xxx:servicebus:start-services --env='
. $kernel->getEnvironment();
$servicebusCommand = new Symfony\Component\Process\Process($command);
$servicebusCommand->start();
Obviously the code starts a servicebus instance which listens to all the incoming requests to the server. Once the tests are ran, the requests go to the servicebus and it stuck there. I need to see the output of the start servicebus command to see what went wrong.
Any idea how to write the output of the process to some log file?