[wp-trac] [WordPress Trac] #46631: Unit test for get_status_header_desc();
WordPress Trac
noreply at wordpress.org
Sat Sep 14 14:51:45 UTC 2019
#46631: Unit test for get_status_header_desc();
-------------------------------------------------+-------------------------
Reporter: pbearne | Owner: desrosj
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: 5.3
Component: HTTP API | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests dev- | Focuses:
feedback |
-------------------------------------------------+-------------------------
Comment (by SergeyBiryukov):
Thanks for the patch!
Since the function is just an array of labels without any complex logic, I
don't see a point in duplicating the entire array in the test.
I think we could just make sure the function returns an empty string if
`$code` is not found, or a non-empty string otherwise, as stated in the
documentation.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46631#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list