mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-02 19:54:28 +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:
@@ -23,21 +23,6 @@ class Tests_Query_SetupPostdata extends WP_UnitTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
public function tearDown() {
|
||||
parent::tearDown();
|
||||
return;
|
||||
|
||||
foreach ( $this->global_keys as $global_key ) {
|
||||
if ( ! is_null( $this->global_data[ $global_key ] ) ) {
|
||||
$GLOBALS[ $global_key ] = $this->global_data[ $global_key ];
|
||||
} else {
|
||||
unset( $GLOBALS[ $global_key ] );
|
||||
}
|
||||
}
|
||||
|
||||
$this->global_data = array();
|
||||
}
|
||||
|
||||
public function test_id() {
|
||||
$p = self::factory()->post->create_and_get();
|
||||
setup_postdata( $p );
|
||||
|
||||
Reference in New Issue
Block a user