Skip to content

test for wp_privacy_exports_url - #5551

Closed
pbearne wants to merge 18 commits into
WordPress:trunkfrom
pbearne:59709_wp_privacy_exports_url
Closed

test for wp_privacy_exports_url#5551
pbearne wants to merge 18 commits into
WordPress:trunkfrom
pbearne:59709_wp_privacy_exports_url

Conversation

@pbearne

@pbearne pbearne commented Oct 23, 2023

Copy link
Copy Markdown

@jdstphen00

This comment was marked as spam.

Comment thread tests/phpunit/tests/functions/wpPrivacyExportsUrl.php Outdated
Comment thread tests/phpunit/tests/functions/wpPrivacyExportsUrl.php Outdated
Comment thread tests/phpunit/tests/functions/wpPrivacyExportsUrl.php Outdated
Comment thread tests/phpunit/tests/functions/wpPrivacyExportsUrl.php Outdated
Comment thread tests/phpunit/tests/functions/wpPrivacyExportsUrl.php Outdated
pbearne and others added 4 commits June 26, 2026 14:02
@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @pbearne@git.wordpress.org.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

Core Committers: Use this line as a base for the props when committing in SVN:

Props pbearne, wildworks, mindctrl, jdstphen00, masteradhoc.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions

Copy link
Copy Markdown

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

@pbearne
pbearne requested a review from mindctrl June 26, 2026 20:44
@masteradhoc

Copy link
Copy Markdown

Thanks for the work @pbearne and the reviews @mindctrl. i'll milestone this for 7.1 now.

Copilot AI review requested due to automatic review settings July 28, 2026 06:48

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds PHPUnit coverage for wp_privacy_exports_url() (Trac #59709), ensuring the exports directory URL is generated correctly and can be overridden via the corresponding filter.

Changes:

  • Introduces a new PHPUnit test file for wp_privacy_exports_url().
  • Adds a test for the default URL construction and a test verifying the wp_privacy_exports_url filter behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/phpunit/tests/functions/wpPrivacyExportsUrl.php Outdated
Comment thread tests/phpunit/tests/functions/wpPrivacyExportsUrl.php Outdated
Comment thread tests/phpunit/tests/functions/wpPrivacyExportsUrl.php
Comment thread tests/phpunit/tests/functions/wpPrivacyExportsUrl.php

@mindctrl mindctrl left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall. The remaining Copilot suggestions make sense.

@t-hamano

t-hamano commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Hi @pbearne, do you have the bandwidth to address the Copilot reviews?

pbearne and others added 2 commits August 4, 2026 13:43
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@pbearne

pbearne commented Aug 4, 2026

Copy link
Copy Markdown
Author

done

@masteradhoc

masteradhoc commented Aug 4, 2026

Copy link
Copy Markdown

@pbearne can you recheck? the last commit removed the } on line 22.

LGTM! @t-hamano can you recheck this one as well?

Comment thread tests/phpunit/tests/functions/wpPrivacyExportsUrl.php Outdated
Comment thread tests/phpunit/tests/functions/wpPrivacyExportsUrl.php Outdated
Comment thread tests/phpunit/tests/functions/wpPrivacyExportsUrl.php Outdated
The `@group` annotation should reference the `functions` group rather than `functions.php`.
Filters added with `add_filter()` are already removed by the base test case's `tear_down()`, so the override is unnecessary.
The callback previously ignored its argument, so the value passed to the `wp_privacy_exports_url` filter was never verified. Deriving the return value from `$exports_url` closes that gap.
pento pushed a commit that referenced this pull request Aug 5, 2026
This adds coverage for the personal data exports directory URL, verifying both the default location under the uploads directory and that the filter of the same name can override it.

Developed in: #5551
Follow-up to [63025].

Props desrosj, masteradhoc, mindctrl, pbearne, wildworks.
Fixes #59709.


git-svn-id: https://develop.svn.wordpress.org/trunk@63028 602fd350-edb4-49c9-b593-d223f7449a82
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

A commit was made that fixes the Trac ticket referenced in the description of this pull request.

SVN changeset: 63028
GitHub commit: 2768106

This PR will be closed, but please confirm the accuracy of this and reopen if there is more work to be done.

@github-actions github-actions Bot closed this Aug 5, 2026
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request Aug 5, 2026
This adds coverage for the personal data exports directory URL, verifying both the default location under the uploads directory and that the filter of the same name can override it.

Developed in: WordPress/wordpress-develop#5551
Follow-up to [63025].

Props desrosj, masteradhoc, mindctrl, pbearne, wildworks.
Fixes #59709.

Built from https://develop.svn.wordpress.org/trunk@63028


git-svn-id: http://core.svn.wordpress.org/trunk@62247 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants