Download & Extend

Upgrade tests to Simpletest 2.x

Project:Webform
Version:6.x-2.3
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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

Comments

#1

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.

#2

Latest, 6.x-2.4.

#3

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.

#4

Status:postponed (maintainer needs more info)» active

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

#5

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.

#6

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

#7

Version:6.x-2.2» 6.x-2.3
Status:active» needs review

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

changing it to that fixed it for me at least

AttachmentSize
webform_test.patch 371 bytes

#8

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

#9

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.

#10

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

Updating the title to a better description.

#11

Status:fixed» closed (fixed)

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

nobody click here