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

WordPress Trac noreply at wordpress.org
Fri Jan 20 07:40:23 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  |     Focuses:
--------------------------------------+-----------------------------

Comment (by martin.krcho):

 I like the idea of using a trait instead of adding the function
 `_upload_file_and_make_attachment` to the base class. I'll try to find
 some time to refactor it.

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


More information about the wp-trac mailing list