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.
Methods like WebTestBase::drupalCreateUser or WebTestBase::drupalCreateNode could get a proper return type
as the return type is known at that time.
Comment | File | Size | Author |
---|---|---|---|
#12 | webtest-documentation-1757098-12.patch | 1.65 KB | PawelR |
#8 | webtest-documentation-1757098-8.patch | 1.65 KB | PawelR |
#5 | webtest-documentation-1757098-5.patch | 1.65 KB | PawelR |
#3 | webtest-documentation-1757098.patch | 1.45 KB | moe4715 |
Comments
Comment #1
jhodgdonUmmm.... what are you asking for? Both of these methods have return value docs, and drupalCreateUser even says object|false for the @return documentation type.
Comment #2
jhodgdonSorry, I'm going through some old issues and found this one...
I do see now that both drupalCreateUser() and drupalCreateNode() on WebTestBase return an EntityInterface item (User can also return FALSE) -- and it's more specifically a Node item for the node one and a User item for the user function.
So, they could both have data types added to their @return docs. These should include the namespace (starting with a backslash). Probably a good Novice project...
Comment #3
moe4715 CreditAttribution: moe4715 commentedThe comments were changed to the full class names for node and user. Also the drupalLogin() function comment was changed.
Comment #4
jhodgdonThanks! This is pretty close... but here:
you still need to have $user at the end of the line.
Comment #5
PawelR CreditAttribution: PawelR commentedre-rolled patch with corrections
Comment #6
dudycz CreditAttribution: dudycz commentedLooks good.
Comment #7
jhodgdonThanks! This one is not quite right:
By convention, when documenting data types we use lower-case "false" not "FALSE".
http://drupal.org/node/1354#types
I checked the others and they all look fine.
Comment #8
PawelR CreditAttribution: PawelR commentedthanks for explaining that, it's lower case now
Comment #10
PawelR CreditAttribution: PawelR commented#8: webtest-documentation-1757098-8.patch queued for re-testing.
Comment #12
PawelR CreditAttribution: PawelR commentedre-rolled patch
Comment #13
dudycz CreditAttribution: dudycz commentedI missed upper case too, it looks ok now.
Comment #14
jhodgdonThanks! I'll get this committed shortly.
Comment #15
jhodgdonThanks again -- committed to 8.x.
Comment #17
imalabyaComment #18
imalabyaChanging it to 8.1.x. Lot have changed. Working on a fresh patch.
Comment #19
dawehner@malavya
This was committed already, there is nothing to do.
Comment #20
imalabyaOk. Then should I open up a new issue?
Comment #21
jhodgdonYes, if you have found more to do, please open a new issue. Restoring original status/version.