WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/16/2015 07:51:32 PM (6 years ago)
Author:
wonderboymusic
Message:

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

See #30017, #33968.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/feed/rss2.php

    r35186 r35224  
    1010 */
    1111class Tests_Feed_RSS2 extends WP_UnitTestCase {
    12     static $user;
     12    static $user_id;
    1313    static $posts;
    1414
    1515    public static function wpSetUpBeforeClass( $factory ) {
    16         self::$user = $factory->user->create();
     16        self::$user_id = $factory->user->create();
    1717        self::$posts = $factory->post->create_many( 5, array(
    18             'post_author' => self::$user,
     18            'post_author' => self::$user_id,
    1919        ) );
    2020    }
    2121
    2222    public static function wpTearDownAfterClass() {
    23         if ( is_multisite() ) {
    24             wpmu_delete_user( self::$user );
    25         } else {
    26             wp_delete_user( self::$user );
    27         }
     23        self::delete_user( self::$user_id );
    2824
    2925        foreach ( self::$posts as $post ) {
Note: See TracChangeset for help on using the changeset viewer.