mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-05 07:07:04 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@35244 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -9,7 +9,7 @@ class Tests_User_Slashes extends WP_UnitTestCase {
|
||||
function setUp() {
|
||||
parent::setUp();
|
||||
$this->author_id = self::factory()->user->create( array( 'role' => 'administrator' ) );
|
||||
$this->old_current_user = get_current_user_id();
|
||||
|
||||
wp_set_current_user( $this->author_id );
|
||||
|
||||
// it is important to test with both even and odd numbered slashes as
|
||||
@@ -23,11 +23,6 @@ class Tests_User_Slashes extends WP_UnitTestCase {
|
||||
$this->slash_7 = 'String with 7 slashes \\\\\\\\\\\\\\';
|
||||
}
|
||||
|
||||
function tearDown() {
|
||||
wp_set_current_user( $this->old_current_user );
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests the controller function that expects slashed data
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user