Unit Tests & Include Paths

Discussion of testing theory and practice, including methodologies (such as TDD, BDD, DDD, Agile, XP) and software - anything to do with testing goes here. (Formerly "The Testing Side of Development")

Moderator: General Moderators

Post Reply
jamiel
Forum Contributor
Posts: 276
Joined: Wed Feb 22, 2006 5:17 am
Location: London, United Kingdom

Unit Tests & Include Paths

Post by jamiel »

Hey all,

In a team of 4 developers, what is the best way for us to handle Include Path's for Unit tests in our dev environment? At the moment we have a BaseTest class which extends PHPUnit_Framework_TestCase and basically set's the include path among other things, and then all tests extend off this. However all of us still need to go into this class and set the include path for our environment everytime we update.

Any ideas appreciated.

Jamie
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Agree on a file/directory structure. This BaseTest class can then use the current working directory to map itself to the correct place. If a base directory needs to be established, set it in a configuration file so you aren't modifying a script all the time.
Post Reply