mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
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:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user