Make WordPress Core


Ignore:
Timestamp:
08/09/2024 06:29:47 PM (2 years ago)
Author:
flixos90
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/xmlrpc/wp/getUser.php

    r52010 r58876  
    9999                $this->assertContains( $user_data['role'], $result['roles'] );
    100100
    101                 wp_delete_user( $user_id );
     101                self::delete_user( $user_id );
    102102        }
    103103
Note: See TracChangeset for help on using the changeset viewer.