Lately I’ve been using this simple setup to print stuff to the terminal during PHPUnit runs.
Use Case 1
Control debug printing by means of opening and closing “parentheses”:
Notice that you can also control (everything or something) either from the testing or the tested code, the only difference being the use of ´$this´ instead of ´$tested´.
Use Case 2
Control debug printing by means of an automatic toggle like this one:
Same considerations as above.
