I have been trying to echo stuff in my phpunit tests but no luck so far.
I read the documentation about the xml config file and apparently the debug parameter is what I am looking for. Unfortunately it still doesn’t work. Anyhow here is my xml config file:
<?xml version="1.0" encoding="UTF-8"?>
<phpunit colors="true"
processIsolation="true"
verbose="true"
debug="true">
</phpunit>
Both processIsolation and verbose are accepted but debug is not.
The command actually works pretty fine when I directly pass it to phpunit like this:
phpunit --debug MyTest.php # here stuff is echoed correctly
but with the xml config file it looks like it is ignored.
Current versions of PHPUnit
>3.6.4(and all3.5.*versions) will just print everything youechoin a test case.produces:
So if you are on an old
3.6version just upgrade 🙂