Hi,
It seems an API change (maybe from #208144) affecting backported D5 and D6 simpletest modules means that hook_simpletest() has been deprecated and is not called. Now Simpletest simply scans for a test dir with .test files in it, which is ok.
The problem is test cases such as UserImportNodeprofile extend UserImportTest, which isn't included yet because of the order that SimpleTest includes the test files. I recommend you add a module_load_include('test', 'user_import', 'tests/user_import') to the top of the test files that include that one, just to make sure they're loaded.
The error that occurs on admin/build/testing is:
Fatal error: Class 'UserImportTest' not found in /var/www/signon/sites/all/modules/user_import/tests/user_import_nodeprofile.test on line 6
This prevents any other test cases being run.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | user_import-simpletest-class-missing-436102.patch | 385 bytes | owen barton |
Comments
Comment #1
neilnz commentedSorry that's #208144: remove hook_simpletest, use tests directory in module dir., mislinked.
Comment #2
EliseVanLooij commentedI'm having the same problem and I can report that the proposed solution ("add a module_load_include('test', 'user_import', 'tests/user_import') to the top of the test files") does solve the original error but throws up a new error:
Removing the user_import module altogether (I hadn't even activated it yet) solves all problems.
Comment #3
neilnz commentedYes. The reason for this is there are two versions of Simpletest out there now, 1.x and 2.x. We're now using 2.x and it detects obsolete 1.x test cases by checking if they extend DrupalTestCase rather than DrupalWebTestCase. Since these ones extend UserImportTest (which then extends DrupalTestCase), it doesn't detect them as 1.x test cases, so tries to include them and fails, because DrupalTestCase isn't available in 2.x.
The real solution here is to just delete the tests from the user import module, since they won't work with SimpleTest 2.x yet anyway.
Some, like the one for testing node profile, aren't even relevant to the D6 version of the module, so should be removed from the module anyway.
Comment #4
nzcodarnoc commented#3 worked for me
cd user_import/
rm -rf tests/
Comment #5
robert castelo commented6.x-3.0-beta1 contains updates to the tests. Not all are fixed yet, but it doesn't crash Simple Test anymore.
Comment #6
owen barton commentedHere is a trivial patch for people who want to get simpletest in an older version running.