Opened 6 years ago
Last modified 4 months ago
#46560 assigned enhancement
Personal Data Export email unit tests found in erasure fulfillment
Reported by: | garrett-eclipse | Owned by: | berubenic |
---|---|---|---|
Milestone: | Future Release | Priority: | low |
Severity: | normal | Version: | 4.9.6 |
Component: | Privacy | Keywords: | has-patch has-unit-tests |
Focuses: | Cc: |
Description
Hello,
While working on #44721 and #46056 I found there's some unit tests for the erasure fulfillment email that aren't covered in the data export email. Specifically, the test on post_type and post_status found here;
https://github.com/WordPress/wordpress-develop/blob/5.1.1/tests/phpunit/tests/privacy/wpPrivacySendErasureFulfillmentNotification.php#L240-L277
We should be checking these to have consistent coverage between unit test suites for the two similar emails.
Cheers
Change History (7)
#1
@
7 months ago
- Keywords needs-patch good-first-bug needs-unit-tests added
- Milestone changed from Awaiting Review to Future Release
- Priority changed from normal to low
This ticket was mentioned in PR #7014 on WordPress/wordpress-develop by @berubenic.
5 months ago
#3
- Keywords has-patch has-unit-tests added; needs-patch needs-unit-tests removed
@SergeyBiryukov commented on PR #7014:
4 months ago
#6
Thanks for the PR! Merged in r58912.
#7
in reply to:
↑ description
@
4 months ago
- Keywords good-first-bug removed
Replying to garrett-eclipse:
While working on #44721 and #46056 I found there's some unit tests for the erasure fulfillment email that aren't covered in the data export email. Specifically, the test on post_type and post_status
Thanks for the ticket! A test for post_type
of the request is now added in [58912].
It appears that wp_privacy_send_personal_data_export_email()
does not perform any checks on the post_status
of the request, so the latter part could use some further investigation.
Marking this as a
good-first-bug
for someone looking to get their feet wet writing unit tests.For a starter guide, there's a page in the Core Handbook detailing writing tests.