WordPress.org

Make WordPress Core

Changeset 35176


Ignore:
Timestamp:
10/15/2015 01:05:50 AM (5 years ago)
Author:
wonderboymusic
Message:

Unit Tests: Tests_Comment needs a tearDownAfterClass impl to avoid spillage.

See #30017, #33968.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/comment.php

    r35173 r35176  
    1717            'post_author' => self::$user_id
    1818        ) );
     19
     20        self::commit_transaction();
     21    }
     22
     23    public static function tearDownAfterClass() {
     24        parent::tearDownAfterClass();
     25
     26        wp_delete_post( self::$post_id );
     27
     28        if ( is_multisite() ) {
     29            wpmu_delete_user( self::$user_id );
     30        } else {
     31            wp_delete_user( self::$user_id );
     32        }
    1933
    2034        self::commit_transaction();
Note: See TracChangeset for help on using the changeset viewer.