Simpletest tests are broken, getting the following error:
Fatal error: Class 'DrupalTestCase' not found in /.../modules/webform/tests/webform.test on line 4

Marking as critical because once you have the messaging module enable Simpletest crashes all the time and you cannot run tests at all.

Similar to #320334: tests broken

CommentFileSizeAuthor
#7 webform_test.patch371 bytesmrfelton

Comments

quicksketch’s picture

Which version of SimpleTest are you using? I believe the SimpleTests are against the Drupal-6--1 version, not really sure. The whole SimpleTest project was a horrible mess during the time I was writing the tests.

mariuss’s picture

Latest, 6.x-2.4.

jose reyero’s picture

Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

All the tests have been upgraded because we are using simpletest 6.x-2.4 now.

@mariuss
Have you really tried with that version?! I've just run them again and seem to be fine.

jose reyero’s picture

Status: Postponed (maintainer needs more info) » Active

Sorry, I've post in the wrong issue, please ignore my comment on #3 :-(

Stalski’s picture

I have the same problem using simpletest 6.x-2.4 and the latest dev version as well.
I get errors like:
Fatal error: Class 'DrupalTestCase' not found in D:\www\alfa\drupal6.6\sites\all\modules\webform\tests\webform.test on line 4
Fatal error: Class 'DrupalTestCase' not found in D:\www\alfa\drupal6.6\sites\all\modules\og\tests\og_post.test on line 4
and even from another module.

mrfelton’s picture

I have the same issue running with the latest reccommended version of simpletest (6.x-2.5) and webform 6.x-2.3:

Fatal error: Class 'DrupalTestCase' not found in /home/tom/public_html/drupal-6.x/sites/all/modules/webform/tests/webform.test on line 4

mrfelton’s picture

Version: 6.x-2.2 » 6.x-2.3
Status: Active » Needs review
StatusFileSize
new371 bytes

Isn't is supposed to read:
class WebformTestCase extends DrupalWebTestCase {

changing it to that fixed it for me at least

james.cartledge’s picture

The patch above gets me past the "Class 'DrupalTestCase' not found" error, but then I bomb out when I try to run the tests:

An error occurred. /batch?id=7&op=do
Fatal error: Call to undefined method WebformPermissionsTestCase::drupalCreateRolePerm() in C:\Program Files\xampplite\htdocs\drupal\src\drupal\sites\all\modules\webform\tests\webform.test on line 58

This is with webform 6.x-2.3 and simpletest 6.x-2.5

quicksketch’s picture

Status: Needs review » Fixed

I've upgraded the entire Webform test suite to the 2.x version of SimpleTest. When 2.4 is out (later today hopefully), this problem will be resolved.

quicksketch’s picture

Title: tests broken » Upgrade tests to Simpletest 2.x

Updating the title to a better description.

Status: Fixed » Closed (fixed)

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