Hello, I've written a perl script (fastens fire-proof suit) that generates module files as well as a test file complete with a test class and stubbed methods. I wasn't really sure where to go about posting it, and webchick suggested I start here. So, here I start. From the documentation:

# Features:
# - creates a module folder and associated file skeletons
# - generates a test class and test methods and places them in a test file
# recognized by SimpleTest. This currently only covers unit tests,
# and not higher level tests like functional or integration tests.
# - can be re-run throughout module development
# - if you add a new function to a module, rerun the script and a test
# stub will be generated and placed in the appropriate test class
# - works with existing modules
# - adds hook_simpletest to an existing module
#
# Issues:
# - test stubs intentionally fail. I tried replicating PHPUnit's
# TestNotImplementedException, but I didn't find a similar facility
#
# Assumptions:
# - the drupal coding standard is followed (generally, 1 tab == 2 spaces)
# - a single module is defined per directory
# - the module has the same name as the directory
#
# Features Not Included:
# - getters and setters for classes defined in module file
# - class handling in general is not working, but the basic code is in place
#
# TODO:
# - complete handling for classes
# - add handling for function removal by developer
# - make template variables files - is this necessary?
# - create CRUD scaffolds a la Ruby on Rails
# - improve test coverage to include suites and further automation
#

Anyway, I hope you find this useful. I'm using it internally at my company.

-Andy

Files: 
CommentFileSizeAuthor
Modulator.pl_.txt20.04 KBlego1974@drupal.org

Comments

lego1974’s picture

I'm an idiot. this should be for user lego1974, not lego1974@drupal.org

sirkitree’s picture

I love this. I don't use it too much for simpletest purposes, but generating a module quickly, i find it faster then module_builder... you should post this in the module_build queue as well

boombatower’s picture

Status: Active » Closed (fixed)

1) I don't think this belongs here.
2) It isn't an issue so doesn't make sense to leave it open.