[TYPO3-core] RFC #10283: Cleanup: Make unit test names more readable by adding underscores as separators

Francois Suter fsuter at cobweb.ch
Thu Jan 29 16:39:27 CET 2009


Hi,

>> Well, we had a long discussion about this and there was a preference to
>> have some underscores to split the parts of the method name that
>> represent different concepts.
> 
> Did we?

Yes, in the first RFC about unit tests (RFC #10220: Feature: Get some 
unit tests for the core)

> Existing CGL draft says "no underscores"... Though I am ok for using something like "test_whaterYouWish" (not "test_WhateverYouWish"). It adds readablity.
> 
> Yet another discussion for the "dev" list? I understand Stucki, we should not have long discussions like this here...

Probably yes (copying this thread to dev list). I suppose Oliver 
submitted his patch because there had already been a (long discussion) 
and he didn't expect more discussion on the topic.

CGL may forbid the use of underscores, but I think some rules can be 
reevaluated when some particular conditions occur. Yourself you wondered 
about such names as:

testCheckModifyAccessListForNonAdminWithTableModifyAccessForBeUsersTableReturnsFalse()

I would say that well-placed, meaningful underscores would definitely 
help readability of that name. I quite enjoy camel case myself, but 
there can be too much of a good thing ;-)

Cheers

-- 

Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch


More information about the TYPO3-team-core mailing list