[wp-trac] [WordPress Trac] #61851: Unit tests should typically not use `wp_delete_user()` to delete users for multisite compatibility
WordPress Trac
noreply at wordpress.org
Fri Aug 9 18:30:02 UTC 2024
#61851: Unit tests should typically not use `wp_delete_user()` to delete users for
multisite compatibility
--------------------------------------+------------------------
Reporter: flixos90 | Owner: flixos90
Type: enhancement | Status: closed
Priority: low | Milestone: 6.7
Component: Build/Test Tools | Version:
Severity: minor | Resolution: fixed
Keywords: has-patch has-unit-tests | Focuses: multisite
--------------------------------------+------------------------
Changes (by flixos90):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"58876" 58876]:
{{{
#!CommitTicketReference repository="" revision="58876"
Build/Test Tools: Avoid using `wp_delete_user()` in PHPUnit tests unless
explicitly acknowledging or ignoring Multisite.
`wp_delete_user()` does not actually delete the entire user when using
WordPress Multisite. Therefore tests should typically use the test helper
method to fully delete the user, unless explicitly ignoring Multisite or
testing the `wp_delete_user()` function while taking Multisite behavior
into account.
Fixes #61851.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61851#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list