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:
Scott Taylor
2015-10-17 19:24:20 +00:00
parent ae226d66b6
commit 613e88fe86
33 changed files with 74 additions and 162 deletions

View File

@@ -27,10 +27,11 @@ class Tests_User_CountUserPosts extends WP_UnitTestCase {
'post_author' => 12345,
'post_type' => 'wptests_pt',
) ) );
self::$post_ids = array_merge( self::$post_ids, $factory->post->create_many( 1, array(
self::$post_ids[] = $factory->post->create( array(
'post_author' => 12345,
'post_type' => 'wptests_pt',
) ) );
) );
}
public static function wpTearDownAfterClass() {