The naming convention for AllTests classes and files - module_AllTests - causes problems with the class autoloader. The phpunit command line test runner looks for the module_AllTests class code file in module/AllTests.php, not module_AllTests.php. As such, we should change this naming convention to remove the underscore.

CommentFileSizeAuthor
#3 phpunit-alltests.patch2.67 KBchop
#1 phpunit-alltests.patch1.92 KBchop

Comments

chop’s picture

StatusFileSize
new1.92 KB

I've put together a patch that changes the file mask for AllTests test suites. It also removes deprecated code initially used to run the test suites without calling the phpunit command line test runner first.

chop’s picture

Status: Active » Needs review

Status change.

chop’s picture

StatusFileSize
new2.67 KB

OK. Great response from all the PHPUnit users out there. :)

I've made a couple more changes and as such have created a new patch. This patch, in addition to what changes we'd already made, adds a bit more explanation of how we're adding the tests to the test suite. Specifically, I've added a couple more comments and separated out the code that deduces the class name from the All Tests suite path. I've also added a standards complaint Drupal code comment block for the Doxygen 'file' command.

Use this patch rather than the previous one.

chop’s picture

Status: Needs review » Fixed

This patch applied to CVS at r1.3

Status: Fixed » Closed (fixed)
Issue tags: -AllTests, -autoloader

Automatically closed -- issue fixed for 2 weeks with no activity.