[wp-trac] [WordPress Trac] #39868: add unit tests for wp_validate_boolean() in function.php
WordPress Trac
noreply at wordpress.org
Tue Sep 17 18:41:03 UTC 2019
#39868: add unit tests for wp_validate_boolean() in function.php
------------------------------+------------------------
Reporter: pbearne | Owner: desrosj
Type: enhancement | Status: reviewing
Priority: normal | Milestone: 5.3
Component: Build/Test Tools | Version: 4.8
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
------------------------------+------------------------
Comment (by desrosj):
Thanks for this, @pbearne!
It seems that there is already a class for testing
`wp_validate_boolean()`, but your data provider method has some additional
scenarios that are not currently tested.
[attachment:"39868.diff"] combines the preexisting conditions with your
added tests, replaces individual methods with a data provider method, and
improves some of the documentation.
See #30238 for the original test class introduction.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39868#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list