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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cs_shadow’s picture

Removed the phrase 'Internal helper function' from the documentation.

joachim’s picture

Status: Active » Needs review

Let's set this to needs review to get the testbot's approval.

jhodgdon’s picture

Version: 7.x-dev » 8.x-dev
Status: Needs review » Needs work

Needs to be fixed in Drupal 8 first, then backported.

And please also fix the first line to start with "Creates" not "Create".

visabhishek’s picture

Status: Needs work » Needs review
FileSize
633 bytes

Patch created for D8 as per #3.

joachim’s picture

Status: Needs review » Reviewed & tested by the community
jhodgdon’s picture

Version: 8.x-dev » 7.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)
Issue tags: +Needs backport to D7

Thanks! Committed to 8.x. Need new patch now for 7.x.

  • Commit ebdb310 on 8.x by jhodgdon:
    Issue #2234611 by visabhishek, cs_shadow, joachim: Fix up docs for...
cs_shadow’s picture

cs_shadow’s picture

Status: Patch (to be ported) » Needs review

Patch in #1 was initially for 7.x only so retesting to check if it still applies cleanly.

jhodgdon’s picture

See #3. Needs new patch for 7.

jhodgdon’s picture

Status: Needs review » Needs work
cs_shadow’s picture

Status: Needs work » Needs review
FileSize
526 bytes
418 bytes

Attaching the patch and interdiff.

joachim’s picture

Status: Needs review » Reviewed & tested by the community
jhodgdon’s picture

Status: Reviewed & tested by the community » Fixed

Thanks! Committed to 7.x.

  • Commit 79d304a on 7.x by jhodgdon:
    Issue #2234611 by visabhishek, cs_shadow, joachim: Fix up docs for...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.