Make WordPress Core


Ignore:
Timestamp:
10/15/2015 01:03:16 AM (9 years ago)
Author:
wonderboymusic
Message:

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

See #30017, #33968.

File:
1 edited

Legend:

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

    r35174 r35175  
    3333    }
    3434
     35    public static function tearDownAfterClass() {
     36        parent::tearDownAfterClass();
     37
     38        if ( is_multisite() ) {
     39            wpmu_delete_user( self::$user_id );
     40        } else {
     41            wp_delete_user( self::$user_id );
     42        }
     43
     44        self::commit_transaction();
     45    }
     46
    3547    function setUp() {
    3648        parent::setUp();
    3749
    3850        $this->user = clone self::$_user;
     51        wp_set_current_user( self::$user_id );
    3952    }
    4053
Note: See TracChangeset for help on using the changeset viewer.