[TYPO3-core] RFC #10220: Feature: Get some unit tests for the core
Oliver Klee
typo3-german-02 at oliverklee.de
Thu Jan 22 19:06:21 CET 2009
Hi Dmitry,
Dmitry Dulepov schrieb:
> What I enjoyed/disliked (50/50) in the patch is this function name:
>
> testCheckModifyAccessListForNonAdminWithTableModifyAccessForBeUsersTableReturnsFalse()
>
> Reminds me one of my favorite web sites:
> http://www.millionreasonswhylatviaisthebestcountryintheworld.com/
Hehe ... ;-)
Yes, that's the problem of fitting the following things in one function
name:
1. "test" (required for the function to be recognized as a test function)
2. the name of the tested functions
3. any relevant (pre-)conditions
4. the expected result
The simpler a function, the shorter the test name because:
1. simpler functions (ie. functions that do only one thing) can have
shorter names
2. the conditions and results are simpler
In my projects, we've defined test function names as an exception of the
80-characters rule-of-thumb because of this.
Oliver
More information about the TYPO3-team-core
mailing list