[wp-trac] [WordPress Trac] #37630: WP_UnitTest_Factory_For_Attachment method for 'create' is not implemented

WordPress Trac noreply at wordpress.org
Fri Aug 19 18:56:22 UTC 2016


#37630: WP_UnitTest_Factory_For_Attachment method for 'create' is not implemented
------------------------------+------------------------------
 Reporter:  bcole808          |       Owner:
     Type:  defect (bug)      |      Status:  new
 Priority:  normal            |   Milestone:  Awaiting Review
Component:  Build/Test Tools  |     Version:
 Severity:  normal            |  Resolution:
 Keywords:  has-patch         |     Focuses:
------------------------------+------------------------------

Comment (by bcole808):

 I agree that the better strategy would be to get the arguments to match
 the rest. Doing so would also fix methods like `create_many()` which
 currently don't work for the attachment factory.

 Detecting old arguments would solve backwards compatibility, my only worry
 is that someone looking at the code might not understand why it is this
 way (for backwards compatibility).

 New patch attached:
 https://core.trac.wordpress.org/attachment/ticket/37630/37630.2.diff
 with a possible implementation of this.

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


More information about the wp-trac mailing list