Changeset 9138
- Timestamp:
- 11/13/2014 04:08:51 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/testcase.php
r9093 r9138 17 17 parent::setUp(); 18 18 19 // Make sure all users are deleted20 19 // There's a bug in the multisite tests that causes the 21 20 // transaction rollback to fail for the first user created, 22 21 // which busts every other attempt to create users. This is a 23 // hack workaround 22 // hack workaround. 24 23 global $wpdb; 25 $wpdb->query( "TRUNCATE TABLE {$wpdb->users}" ); 24 if ( is_multisite() ) { 25 $user_1 = get_user_by( 'login', 'user 1' ); 26 if ( $user_1 ) { 27 $wpdb->delete( $wpdb->users, array( 'ID' => $user_1->ID ) ); 28 clean_user_cache( $user_1 ); 29 } 30 } 26 31 27 32 // Fake WP mail globals, to avoid errors
Note: See TracChangeset
for help on using the changeset viewer.