[wp-trac] [WordPress Trac] #56248: Reduce code duplication in tests that upload file as attachment
WordPress Trac
noreply at wordpress.org
Thu Jan 19 20:57:01 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 hellofromTonya):
I like the idea of consolidating code into a reusable function for all of
the tests that need it. Not sure though if putting it in the Base abstract
is the right place for it. A trait may be better. That way each test that
needs it can use that trait to gain access. Adding to my list to review
the PR and think about how to encapsulate it for reuse.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56248#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list