Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Currently if you want to distribute tests with your module you have to write addition code in your module, which is completely superfluous if you are not running tests. This patch removes hook_simpletest completely and looks in the /tests/ folder of each module directory.
I think it is a nice simplification simply because it will remove 5 repeated lines of code in every module that wants to implement simpletests. It will also create a standard location where people know to look for/place tests.
Comment | File | Size | Author |
---|---|---|---|
#1 | nohook_simpletest.patch | 1.82 KB | webchick |
nohook_simpletest.patch | 1.83 KB | dopry | |
Comments
Comment #1
webchickOh, +1 for this! I've always thought this was rather silly.
Tested the patch and it works. There were a couple minor spacing errors that I fixed. Please don't credit me for the patch.
Comment #2
moshe weitzman CreditAttribution: moshe weitzman commentedyes, make sense
Comment #3
Rok Žlender CreditAttribution: Rok Žlender commentedCommitted to both HEAD and D5 versions. Thanks dopry and webchick.
Comment #4
webchickComment #5
webchickEr. Sorry, this one was already ported. :)
Comment #6
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.