Make WordPress Core


Ignore:
Timestamp:
10/17/2015 07:24:20 PM (9 years ago)
Author:
wonderboymusic
Message:

Unit Tests: WP_UnitTest_Generator_Sequence needs a static incrementer - otherwise, it assumes every test class is a reset, which it no longer is (it is now static).

While we're at it, remove unnecessary tearDown() code.

See #30017, #33968.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/user/slashes.php

    r35242 r35244  
    1010        parent::setUp();
    1111        $this->author_id = self::factory()->user->create( array( 'role' => 'administrator' ) );
    12         $this->old_current_user = get_current_user_id();
     12
    1313        wp_set_current_user( $this->author_id );
    1414
     
    2424    }
    2525
    26     function tearDown() {
    27         wp_set_current_user( $this->old_current_user );
    28         parent::tearDown();
    29     }
    30 
    3126    /**
    3227     * Tests the controller function that expects slashed data
Note: See TracChangeset for help on using the changeset viewer.