[wp-trac] [WordPress Trac] #35494: Add inline docs for unit test suite

WordPress Trac noreply at wordpress.org
Sun Jan 17 19:03:28 UTC 2016


#35494: Add inline docs for unit test suite
--------------------------+-------------------
 Reporter:  ericlewis     |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  4.5
Component:  General       |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  docs
--------------------------+-------------------

Comment (by jdgrimes):

 It would be helpful if `@method` docs were added for each of the
 factories' `create()`, `create_and_get()`, and `create_many()` methods.
 Because these methods are defined only once in the `Factory_For_Thing`
 class, the precise return values of each one is not documented for each
 factory. I've found that adding `@method` docs to each factory so that the
 return types are documented is very helpful, especially when using an IDE
 with auto-completion. That way you know that you are getting a `WP_User`
 object when you call `$this->factory->user->create_and_get()`, for
 example.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35494#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list