Hello Sebastian! It was good to see you in Atlanta, and hope to see you again before another year passes. Thanks very much for all your hard work, and even more so for sharing it with the rest of us. Rest assured it is put to good use!
Hi Sebastian, I am trying to get into writing tests when I develop php, however, I am running into some issues, and I thought that you might be able to point me in the right direction.
I have phpunit installed, and I am running it, however, I have some dependecies (like setting the include path and instantiating some singletons) that are set in auto_prepend. How do you recommend that one goes about creating the environment required by the classes that I am trying to test?
For instance, I want to test CronLogger.php which requires FileLogger.php: require_once('FileLogger.php'), however, the include paths are all set up in the apache autoprepend file so the require in the CronLogger throws a fatal.
Does phpUnit have something like auto_prepend that allows it to set up the environment for the tests?
18/09/2007 at 23:58 Permalink
Reply
16/11/2007 at 00:22 Permalink
I have phpunit installed, and I am running it, however, I have some dependecies (like setting the include path and instantiating some singletons) that are set in auto_prepend. How do you recommend that one goes about creating the environment required by the classes that I am trying to test?
For instance, I want to test CronLogger.php which requires FileLogger.php: require_once('FileLogger.php'), however, the include paths are all set up in the apache autoprepend file so the require in the CronLogger throws a fatal.
Does phpUnit have something like auto_prepend that allows it to set up the environment for the tests?
Thanks!
Ashton
Reply
16/11/2007 at 08:39 Permalink
Reply