Hi all,
This is my first email to the list. So, sorry if this is a bad place to
ask this.
I'm trying to set up PHPunit for testing my ZF projects.
To make things really simple and not have a bunch of code flying back
and forth, here is a reproducible test.
I take Jon's PHPunit Zend Cast code and run PHPunit (phpunit
--configuration phpunit.xml) on my workstation, and it runs fine. On my
dev server, I get:
Fatal error: Class 'ControllerTestCase' not found in
/var/www/unit-testing/tests/application/controllers/IndexControllerTest.php
on line 3
My cli php include path on both machines is:
include_path = ".:/usr/share/php:/usr/share/php5"
Server OS: Lenny
Workstation OS: Kubuntu 10.04
Anyone have any ideas?
Jon's code:
http://www.zendcasts.com/wp-content/uploads/2009/06/zc25-unit-testing.zip
http://code.google.com/p/zendcasts/source/browse/#svn/trunk/zc25-unit-testing
Feel free to look at the code. However, as I said, it runs fine on one
machine. So there is nothing wrong with the code, AFAICT. It seems there
may be something wrong with the environment or some setting. Another
hint is that I have a cron job trigger a bootstrap file and use classes
from my app to do some maintenance tasks. I didn't have to do anything
special for this to work. I could use all the classes as is, and the
Zend_Application autoloader would do it's job. Things seem different
with PHPunit.
Thanks,
Simon
PS
I sent this a while ago, but it doesn't seem to have gone through. So,
I'm sending it again. m(_ _)m