Hi everyone,
I just wasted 30 minutes to find a small bug in my test class (class ProjectTest extends CDbTestCase).
Running phpunit unit/ProjectTest.php from the shell all I got were "…" Two measly little dots.
So I went to the php-log file and got the following line:
"PHP Fatal error: Call to a member function save() on a non-object in /Applications/MAMP/htdocs/trackstar/protected/tests/unit/ProjectTest.php on line 0"
This wasn’t helpful either. There was nothing wrong with line 0!
So I went old-school and
-
run another testfile, which worked (good environment works)
-
comment the whole file out (again, phpunit is not very talkative here, just no output at all)
-
comment all methods out (nothing again)
-
just allow the first method to run (worked)
-
and so forth
OK, finanlly I found the mistake, which was a wrong spelling of a before declared object.
QUESTION:
Is there any better, faster, more modern way to get usefull debugging information on phpunit tests?
Cheers,
Peter