PHPUnit for Drupal 6 ( and soon 7)

casivaagustin's picture

Hi Folks, I'm working in a module to run Unit Tests in Drupal with PHPUnit.

Actually the project is in a Sandbox state and is current development, but I wanna receive some feedback, opinion, suggestions, critics, features request, etc.

If anyone is interested in more data please put in contact with me.

http://drupal.org/sandbox/casivaagustin/1678226

Thanks and Regards

Comments

bootstrapping d7 in PHPUnit

flamingtop's picture

I've tried bootstrapping D7 in PHPUnit but with no luck. What I did was the same as the index.php is doing

define('DRUPAL_ROOT', getcwd());
require_once DRUPAL_ROOT.'/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);

class MyTest extends PHPUnit_Framework_TestCase {
....
}

but somehow the process got choked at line 3 drupal_bootstrap(...) call, I'm wondering what the essential steps are to make it work, could you shed some light?