Unit Tests: since [32953], we can just use self::delete_user() instead of using if logic for Multisite.

See #30017, #33968.


git-svn-id: https://develop.svn.wordpress.org/trunk@35224 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2015-10-16 19:51:32 +00:00
parent 0d4a7ee029
commit 84272ff8cd
11 changed files with 42 additions and 84 deletions

View File

@@ -9,22 +9,18 @@
* @group feed
*/
class Tests_Feed_RSS2 extends WP_UnitTestCase {
static $user;
static $user_id;
static $posts;
public static function wpSetUpBeforeClass( $factory ) {
self::$user = $factory->user->create();
self::$user_id = $factory->user->create();
self::$posts = $factory->post->create_many( 5, array(
'post_author' => self::$user,
'post_author' => self::$user_id,
) );
}
public static function wpTearDownAfterClass() {
if ( is_multisite() ) {
wpmu_delete_user( self::$user );
} else {
wp_delete_user( self::$user );
}
self::delete_user( self::$user_id );
foreach ( self::$posts as $post ) {
wp_delete_post( $post, true );