Want to output in CLI during execution of PHPUnit tests? Just realized another way to do this that works much better than the –verbose command line option:
1 2 3 4 5 6 |
class TestSomething extends PHPUnit_Framework_TestCase { function testSomething() { $myDebugVar = array(1, 2, 3); fwrite(STDERR, print_r($myDebugVar, TRUE)); } } |
This lets you dump anything to your console at any time without all the unwanted output that comes along with the –verbose CLI option.
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.