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
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

AttachmentSizeStatusTest resultOperations
test_comment_cleanup.patch50.49 KBIdleFailed: Failed to apply patch.View details | Re-test

#1

Anonymous (not verified) - November 10, 2008 - 11:55
Status:needs review» needs work

The last submitted patch failed testing.

#2

dww - November 18, 2008 - 21:45

FWIW, I totally support this change. ;)

 
 

Drupal is a registered trademark of Dries Buytaert.