[wp-trac] [WordPress Trac] #56248: Reduce code duplication in tests that upload file as attachment

WordPress Trac noreply at wordpress.org
Mon Jan 30 10:59:19 UTC 2023


#56248: Reduce code duplication in tests that upload file as attachment
-------------------------------------------------+-------------------------
 Reporter:  martin.krcho                         |       Owner:
                                                 |  SergeyBiryukov
     Type:  enhancement                          |      Status:  reviewing
 Priority:  normal                               |   Milestone:  6.2
Component:  Media                                |     Version:  6.1
 Severity:  minor                                |  Resolution:
 Keywords:  has-patch has-unit-tests changes-    |     Focuses:
  requested                                      |
-------------------------------------------------+-------------------------

Comment (by martin.krcho):

 The PR is updated.

 `_upload_file_and_make_attachment()` and `_upload_file()` were moved to a
 new trait.

 I also updated the PHPdocs where needed.

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


More information about the wp-trac mailing list