Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The ckeditor module uses test class members with underscored names. Some examples are big_user, web_user and admin_user, but there could be others. According to our coding conventions, these should be renamed to bigUser, webUser and adminUser. In addition, some properties are undefined but should be.
See the parent issue #1811638: [meta] Clean-up Test members - ensure property definition and use of camelCase naming convention.
Beta phase evaluation
Issue category | Task, because this is a coding standards change. |
---|---|
Issue priority | Not critical because coding standard changes are not critical. |
Unfrozen changes | Unfrozen because it only changes automated tests. |
Disruption | There is no disruption expected from this sort of change. |
Comment | File | Size | Author |
---|---|---|---|
#17 | 2381303-17.patch | 4.3 KB | rpayanm |
#17 | 2381303-interdiff.txt | 811 bytes | rpayanm |
#15 | clean_up_ckeditor-2381303-interdiff-5-15.txt | 1.39 KB | tibbsa |
#15 | clean_up_ckeditor-2381303-15.patch | 4.26 KB | tibbsa |
Comments
Comment #1
Wim LeersYep, those property names with underscores are from the previous test coding standard conventions.
Comment #2
mglamanJust found references to admin_user, cleaned up.
Comment #3
Wim Leerscore/modules/ckeditor/src/Tests/CKEditorLoadingTest.php
containsuntrusted_user
andnormal_user
.Comment #4
cilefen CreditAttribution: cilefen commented@mglaman The parent issue summary has a grep command that may help you find any other missed instances.
Comment #5
hussainwebI checked with the grep command and found no other files in ckeditor module.
Comment #6
Wim LeersThanks, looks good!
Comment #7
tibbsa CreditAttribution: tibbsa commentedIn CKEditorLoadingTest:
These should be provided with declarations and docblocks.
Comment #8
mglamanMoving back to RTBC. tibbsa, see parent meta issue
The declarations and docblock changes are outside of the scope for this meta issue.
Comment #9
tibbsa CreditAttribution: tibbsa commentedExactly how is "ensure property definition" (perhaps this should say 'declaration') outside the scope of this issue?
This was the comment and first instance which originally resulted in that note being added to the parent issue and the scope slightly expanded: #2380773-1: Clean-up Node module test members - ensure property definition and use of camelCase naming convention
While adding docblocks to random variables may not be "in scope", adding new property declarations in the class definition (which implies documenting them in the process) is and those changes have been made in all the other sub-issues. That is what is meant by "ensure property definition".
Comment #10
cilefen CreditAttribution: cilefen commentedThere are more to be done.
Also, the purpose of the meta is to declare the test properties. The Drupal coding standards imply they must also be documented, so let's do that please.
Comment #11
thomasdegraaff CreditAttribution: thomasdegraaff commentedI'm going to fix the issues mentioned in #10.
Edit:
The code changes mentioned in #10 are already fixed in patch #5
Comment #12
rpayanmI agree with @Thomas de Graaff, then RTBC
Comment #13
cilefen CreditAttribution: cilefen commented@Thomas de Graaff , sorry, I must have reviewed the wrong patch.
adminUser, untrustedUser, and normalUser are not defined.
Comment #14
webchickAgreed this should follow the standard set in #2384165: Clean-up Contextual module test members — ensure property definition and use of camelCase naming convention and explicitly declare these new member variables, w/ docs. We do not want to be introducing more code to clean up later, especially in a minor task that's not related to getting D8 released faster in any way.
Comment #15
tibbsa CreditAttribution: tibbsa commentedComment #16
Wim Leers#15: Thanks, looks great!
But now that it's documented there, let's remove this:
Comment #17
rpayanmComment #18
Wim LeersThanks!
Comment #19
alexpottCommitted ca3cc9b and pushed to 8.0.x. Thanks!
Thanks for adding the beta evaluation for to the issue summary.