API page: https://api.drupal.org/api/drupal/modules!simpletest!drupal_web_test_cas...
This says: 'Internal helper function'.
However, it's useful to be able to create roles in tests. So considering this as internal is not ideal. Moreover, Drupal core is already violating this: the list of calls to this method shows that 2 test cases in user module are making use of this.
Therefore, either the documentation text is wrong, or the use of this method is wrong. I would say the former.
Comment | File | Size | Author |
---|---|---|---|
#12 | interdiff-1-12.txt | 418 bytes | cs_shadow |
#12 | drupal-drupal_create_role_documentation-2234611-12.patch | 526 bytes | cs_shadow |
#4 | drupal8.create-role-documentation-223461-04.patch | 633 bytes | visabhishek |
#1 | drupal-drupal_create_role_documentation-2234611-1.patch | 525 bytes | cs_shadow |
Comments
Comment #1
cs_shadow CreditAttribution: cs_shadow commentedRemoved the phrase 'Internal helper function' from the documentation.
Comment #2
joachim CreditAttribution: joachim commentedLet's set this to needs review to get the testbot's approval.
Comment #3
jhodgdonNeeds to be fixed in Drupal 8 first, then backported.
And please also fix the first line to start with "Creates" not "Create".
Comment #4
visabhishek CreditAttribution: visabhishek commentedPatch created for D8 as per #3.
Comment #5
joachim CreditAttribution: joachim commentedComment #6
jhodgdonThanks! Committed to 8.x. Need new patch now for 7.x.
Comment #8
cs_shadow CreditAttribution: cs_shadow commented1: drupal-drupal_create_role_documentation-2234611-1.patch queued for re-testing.
Comment #9
cs_shadow CreditAttribution: cs_shadow commentedPatch in #1 was initially for 7.x only so retesting to check if it still applies cleanly.
Comment #10
jhodgdonSee #3. Needs new patch for 7.
Comment #11
jhodgdonComment #12
cs_shadow CreditAttribution: cs_shadow commentedAttaching the patch and interdiff.
Comment #13
joachim CreditAttribution: joachim commentedComment #14
jhodgdonThanks! Committed to 7.x.