We set the global in our preend file, which is used to form the path for require_once calls. For example:
require_once($GLOBALS['root'].'/library/particleboard/JsonUtil.php');
The problem is that when you run the PHPUnit skeleton test builder, the preend file does not start, so the global one is never installed. When i started
cd /company/trunk/queue/process; phpunit --skeleton-test QueueProcessView
PHPUnit tries to enable require_once in QueueProcessView, but since $ GLOBALS ['root'] is never set, I get a fatal error when including the required file.
For example, for PHPUnit, what should be
require_once(/code/trunk/library/particleboard/JsonUtil.php)
resolved as
require_once(/library/particleboard/JsonUtil.php)
Pay attention to the missing root.
Does anyone know if the skeleton test code has any way to invoke a PHP file before it runs? In this, I could set my GLOBAL ['root'] in this file.
.