DROP Task: Tests no longer work due to change to simpletest module (6.x)
gustav - March 2, 2008 - 12:40
| Project: | Organic groups |
| Version: | HEAD |
| Component: | og.module |
| Category: | task |
| Priority: | normal |
| Assigned: | marvil07 |
| Status: | closed |
Description
Because simpletest.module now no longer uses hook_simpletest (see http://www.lullabot.com/articles/drupal-module-developer-guide-simpletes...), the og tests no longer run because og_testcase.php is not loaded.

#1
And because they need to be updated for changes in og. help!
#2
I'm new at unit testing, but I have some time. I hope I can send a patch against 5.x-5.4 shortly.
Cheers
#3
marvil07: that is great. Could you possible make the patch against the development code (http://drupal.org/node/95202). Due to a recent change in language strings tests that work with 5.x-5.4 will not work with the latest code.
#4
Please claim this on the DROP site if you plan on working on it, just so we know what's going on. Thanks!
#5
OgTestCase class define 3 member functions and 1 variable to reuse in both Og post and Og Membership unit test clases.
Checking out for example, profile module unit test classes, I see they have the same problem, and they solved it re-defining the same functions in both classes.
So I've done the same. I know it's a dirty way but it's a first attempt.
BTW I only make it work on simpletest-5.x-1.x-dev. I still don't know why the tests are *not reconized* on simpletest-5.x-1.0.
I've also seen some errors while making the tests, but I don't know if they are because of the test or the module(probably the tests).
#6
Please provide a patch if possible.
#7
Sorry, I forgot to generate the diff's.
Here there are.
#8
I tested those two patches and adapted them to the DRUPAL-5 branch. I created a new issue for them, as a lot of the assertions check against UI text and there might be differences between 5 and 6 that I am not aware of: http://drupal.org/node/247485
The issues I fixed and the ones I couldn't fix might also apply to these patches.
If the tests for 5.x and 6.x are too similar to justify two open issues, feel free to mark #247485 duplicate and attach latest version of patch to this thread.
#9
og_subscribe has some failed assertions still but i've reworked and committed these patches (with alex_b help). thanks.
#10
Automatically closed -- issue fixed for two weeks with no activity.