[wp-trac] [WordPress Trac] #44234: Add missing unit tests for erasing personal data by username or email address
WordPress Trac
noreply at wordpress.org
Fri Sep 21 19:06:14 UTC 2018
#44234: Add missing unit tests for erasing personal data by username or email
address
---------------------------------------------+-----------------------------
Reporter: desrosj | Owner: desrosj
Type: enhancement | Status: assigned
Priority: low | Milestone: 4.9.9
Component: Privacy | Version: 4.9.6
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests commit | Focuses: administration
---------------------------------------------+-----------------------------
Changes (by desrosj):
* keywords: has-patch has-unit-tests needs-testing => has-patch has-unit-
tests commit
Comment:
> I only used the first input argument of those filter, so it's open for
improvements to add the other arguments.
I think tests for filters should just confirm that a filtered value
effects the outcome of the function, so this should be sufficient.
> The unit tests are a useful documentation, so what about changing the
order of methods; show first the methods that explain how it should work,
then after that the methods for failing/error?
I think this is just preference, but fine with your changes. I usually
organize my tests in a top down manner, testing the scenarios from the
first line of the function to the last.
All your changes look good, though. I think this one is ready.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44234#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list