Replace echo to flushable stdout
Added outPath and forceFlush arguments
FYI:
This is useful, when a custom phpunit printer explicit flushes its results.
This was sent in #19 too before
Dear @johnkary ,
On our several systems we can't change buffering strategy, and the only one solution for continuous phpunit status printing was a flushing results printer. When the result is printing with explicit flushes, your stuff printed the output after the end of phpunit output, what wasn't so good.
- In other hand, the phpunit result printer supports out of the box the flushing, therefore I think, this not extremely bad idea, check my example in https://github.com/johnkary/phpunit-speedtrap/pull/19#issuecomment-227512194
So, I tried to implement the flushing in your stuff, but I couldn't reach the flushing without writing php://stdout directly.
- There looked good a freely configurable output when I wrote the fopen(), e.g. for a file output for this result, or "red highlighting" in docker with php://stderr.
So this is the history/reason of these two arguments.
Dear @johnkary, do you have any update?
Where we sticked @johnkary? Should I help you?
@andras-tim Sorry, very busy with paid work. Will have time to look closer sometime in May.
@johnkary, is there any news?
ping
@andras-tim I've begun looking at this and looks like it will work! I'll give it a final look using a custom result printer to be sure.
In the meantime I tried using your changes to phpunit-speedtrap with whatthejeff/nyancat-phpunit-resultprinter, the PHPUnit results printer that prints Nyancat output for test results. That library didn't support PHPUnit 6 yet so I fixed it and PR'd 😋
Thank you @johnkary!
@johnkary, is there any news?