I agree with Kris's comment that you want to avoid this behavior, but if you need to, maybe you could do something like this:
class My_PHPUnit_Framework_TestCase extends PHPUnit_Framework_TestCase { function __construct() { parent::__construct(); // Insert your one time setup scripts here } }
Then make sure your tests extend My_PHPUnit_Framework_TestCase instead of PHPUnit_Framework_TestCase.
Adam V.
source share