Dec 23, 2020
0
Level 20
Laravel PHP Unit - Keep output from tests
I'm trying to run a few tests in Laravel 7 with PHPUnit 8.5.
In these tests, I am dumping information as the test isn't simply pass or fail, but dumping further information to help improve page load efficiency. For this reason, I am dumping this data into the terminal.
Data is dumped into the terminal while the test is running, but once the test has been completed, the information is removed.
Problem: I would like to prevent this output from being removed.
Attempted solutions that did not work:
--verbose
--debug
--no-interaction
- turn on strict mode within phpunit
- dump information using the fwrite() method
- ob_flush()
- print_r()
- print() Note: I realise that this topic has been discussed previously, but none of those methods are currently working.
Please or to participate in this conversation.