How to output in CLI during execution of PHP Unit tests?

后端 未结 18 1641
旧时难觅i
旧时难觅i 2020-11-30 18:01

When running a PHPUnit test, I would like to be able to dump output so I can debug one or two things.

I have tried the following (similar to the PHPUnit Manual examp

18条回答
  •  执笔经年
    2020-11-30 18:01

    I output my Testresults HTML based, in this case it was helpfull to flush the content:

    var_dump($array);
    ob_flush();
    

    There is a second PHP Method

    flush() 
    

    which i not has tried.

提交回复
热议问题