When i go to 'admin/build/testing' i get this error:
Fatal error: Class 'DrupalTestCase' not found in /var/www/mysite/sites/all/modules/date/tests/date_api.test on line 6
I think the problem is with the hook_simpletest function. The date_api module has 2 test files stored in a subdirectory "tests". The module implements hook_simpletest and returns the path to these test files.
If i rename the files from *.test to *.test_ then the error vanishes (date_api is the only module installed that implements hook_simpletest hook).

Really sorry but now i don't have time to see if D7 has the same issue.
Thanks,
Andrei

Comments

andreiashu’s picture

Status: Active » Fixed

Ouch, just now i saw that date_api extends DrupalTestCase and not DrupalWebTestCase...

yhager’s picture

Status: Fixed » Active

I'm probably missing something, as I have the same problem, but I don't understand the fix.

boombatower’s picture

Status: Active » Fixed

The SimpleTest 1.x API tests extend DrupalTestCase...the 2.x API tests extend DrupalWebTestCase....the latest dev SimpleTest 2.x ignores the 1.x style tests so you don't get an error, accidentally left that out.

You still need to update the tests to run them in 2.x.

Overall this is fixed in dev, new release soon just waiting for more feedback.

Status: Fixed » Closed (fixed)

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

Umayal’s picture

Fatal error: Class 'DrupalWebTestCase' not found I am also getting the same error in my test module, anybody cleared?

mustafa.ata’s picture

Hi,

I am getting this issue

Fatal error: Class 'DrupalWebTestCase' not found in /sites/all/modules/captcha/captcha.test on line 35

I am not using any test module, this error somehow has occurred, and has blocked my whole site. Dont know what happened to it. The whole site works ok before this error on the server and on my local machine.

In search of a solution.....

mustafa.ata’s picture

Issue summary: View changes
Status: Closed (fixed) » Needs work
Lendude’s picture

Status: Needs work » Closed (outdated)

This version is not supported anymore.