PHPUnit problem - no error messages
I had the same problem, even with all error reporting enabled.
I tried to put echo
statements into my test and setUp
methods to find out where it was hanging, but they never appeared. The problem turned out to be PHP's output buffering. When I added the following method to my test:
protected function debug($text){ echo "\nDEBUG: $text\n"; flush(); ob_flush();}
and used $this->debug()
instead of plain echo
, I was able to see my debug statements. A binary search through the code quickly led to the source of the problem (an invalid database fixture, in my case).