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

后端 未结 18 1665
旧时难觅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:26

    If you use Laravel, then you can use logging functions such as info() to log to the Laravel log file under storage/logs. So it won't appear in your terminal but in the log file.

提交回复
热议问题