WordPress.org

Make WordPress Core

Changeset 30278


Ignore:
Timestamp:
11/08/2014 07:55:05 PM (7 years ago)
Author:
boonebgorges
Message:

In unit tests, use wpmu_delete_user() to delete users when is_multisite().

wp_delete_user() doesn't remove the user from the database, which causes all
sorts of problems in certain cases.

Props jeremyfelt.
See [30277], #30017.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/testcase-canonical.php

    r30277 r30278  
    117117        global $wp_rewrite;
    118118
    119         wp_delete_user( self::$author_id );
     119        if ( is_multisite() ) {
     120            wpmu_delete_user( self::$author_id );
     121        } else {
     122            wp_delete_user( self::$author_id );
     123        }
    120124
    121125        foreach ( self::$post_ids as $pid ) {
Note: See TracChangeset for help on using the changeset viewer.