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

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

    It's not a bug, but very much intentional. Your best bet is to write to a log file of some kind and tail the log to watch for output.

    If you are trying to TEST output, check this out.

    Also:

    Note: Please note that PHPUnit swallows all output that is emitted during the execution of a test. In strict mode, a test that emits output will fail.

提交回复
热议问题