Remove generic comments from inherited test methods
flobruit - October 16, 2008 - 16:55
| Project: | Drupal |
| Version: | 7.x-dev |
| Component: | tests |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Jump to:
Description
Based on the discussion on http://groups.drupal.org/node/7731, it appears that putting comments for inherited test methods like getInfo(), setUp() and tearDown() is generally confusing. Rather than treating them like hook implementations or having a generic comment being repeated, it would be cleaner to not have comments at all. This opinion is shared by many people including dww, moshe and drewish.
Here's a patch based on a regular expression to remove all comments from getInfo(), setUp() and tearDown() functions in .test files.
For the reference, here's the regexp:
In *.test files, replace
([^\n]*\/\*\*\n.*\n\s*\*\/\n)(\s*)function (getInfo|setUp|tearDown)with
$2function $3| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| test_comment_cleanup.patch | 50.49 KB | Idle | Failed: Failed to apply patch. | View details | Re-test |

#1
The last submitted patch failed testing.
#2
FWIW, I totally support this change. ;)