Problem/Motivation
When people, especially new people, try to follow the test coding standards:
http://drupal.org/node/325974
They may find experienced developers disagreeing with them.
Following the test coding standards might be not worth doing because it need updating.
Proposed resolution
A. Update the test coding standards, making it consistant with
http://drupal.org/node/1354#files
B. Take out the parts from the tests standards that are the same as (or should be the same as) 1354
C. Add the bits about tests to 1354 because everyone knows about that doc, and no looks to see if there is a separate doc for tests.
Remaining tasks
- decide on a resolution
- implement what is decided
User interface changes
N/A
API changes
N/A
Comments
Comment #1
YesCT CreditAttribution: YesCT commentedFor example, for D8 tests, it should probably say
For files containing the definition of exactly one class/interface, use this template:
instead of
For example in #1804702: Display interface translation status
Comment #2
YesCT CreditAttribution: YesCT commentedAlso, maybe as suggested in irc, another option:
D. enlarge the Drupal 8 section
Comment #3
YesCT CreditAttribution: YesCT commentedRelated:
PSR-0 is http://drupal.org/project/issues/search/drupal?issue_tags=PSR-0 and is also https://img.skitch.com/20120523-r6y7ife93b3x35yme4s6dpapds.png and is also PSR-0 compatible class loader in core Change Notice / Change Record http://drupal.org/node/1320394
Comment #4
YesCT CreditAttribution: YesCT commentedComment #5
YesCT CreditAttribution: YesCT commentedComment #6
jhodgdonSounds like this is a coding standards/documentation issue? Should be in the documentation component, not tagged "documentation".
Comment #7
YesCT CreditAttribution: YesCT commentedcould use an example of a one line for the doc block for test functions, to clarify if it should be like 1354 and be third person verb * Tests …
Right now it says, in two places:
* One-sentence description of what test entails.
Comment #8
YesCT CreditAttribution: YesCT commentednamespace standards doc give example:
test standards says:
and 1354 says classes doc block is like:
* Defines
oh, I thought it did.. now I can't find it.
Comment #9
YesCT CreditAttribution: YesCT commentedRe #7
http://drupal.org/node/325974/revisions/view/2482710/2603306
Now has example that says: * Tests
with the third person verb.
Comment #10
YesCT CreditAttribution: YesCT commentedrelated #338403: Use {@inheritdoc} on all class methods (including tests)
Comment #11
alexpottI agree with B...
Comment #12
jhodgdonOK... I took a look at
https://drupal.org/node/325974
and it seems like the action items are all in the "Test template" section:
1. @file is not following our standards and should probably just link to the node/1354 section on @file:
https://drupal.org/node/1354#file
or else it should just include the last example from there (the "Contains..." one).
2. The class description doesn't follow our standards, because it should start with a verb as per
https://drupal.org/node/1354#classes
so we should probably just change the example to read "Tests foo functionality" or something like that.
The rest looks like it follows our standards... and I don't think these changes are controversial in any way, so I went ahead and edited the page. Here's the revision information:
If there is disagreement about what I did, we can edit the page again and/or revert my changes, but I thought I would just do it since I really don't think there is any disagreement.
https://drupal.org/node/325974/revisions/view/2672980/2742853
Provisionally marking this issue fixed.