mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Code is Poetry.
WordPress' code just... wasn't. This is now dealt with. Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS. Fixes #41057. git-svn-id: https://develop.svn.wordpress.org/trunk@42343 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -9,29 +9,43 @@ class Tests_User_CountUserPosts extends WP_UnitTestCase {
|
||||
static $post_ids = array();
|
||||
|
||||
public static function wpSetUpBeforeClass( $factory ) {
|
||||
self::$user_id = $factory->user->create( array(
|
||||
'role' => 'author',
|
||||
'user_login' => 'count_user_posts_user',
|
||||
'user_email' => 'count_user_posts_user@example.com',
|
||||
) );
|
||||
self::$user_id = $factory->user->create(
|
||||
array(
|
||||
'role' => 'author',
|
||||
'user_login' => 'count_user_posts_user',
|
||||
'user_email' => 'count_user_posts_user@example.com',
|
||||
)
|
||||
);
|
||||
|
||||
self::$post_ids = $factory->post->create_many( 4, array(
|
||||
'post_author' => self::$user_id,
|
||||
'post_type' => 'post',
|
||||
) );
|
||||
self::$post_ids = array_merge( self::$post_ids, $factory->post->create_many( 3, array(
|
||||
'post_author' => self::$user_id,
|
||||
'post_type' => 'wptests_pt',
|
||||
) ) );
|
||||
self::$post_ids = array_merge( self::$post_ids, $factory->post->create_many( 2, array(
|
||||
'post_author' => 12345,
|
||||
'post_type' => 'wptests_pt',
|
||||
) ) );
|
||||
self::$post_ids = $factory->post->create_many(
|
||||
4, array(
|
||||
'post_author' => self::$user_id,
|
||||
'post_type' => 'post',
|
||||
)
|
||||
);
|
||||
self::$post_ids = array_merge(
|
||||
self::$post_ids, $factory->post->create_many(
|
||||
3, array(
|
||||
'post_author' => self::$user_id,
|
||||
'post_type' => 'wptests_pt',
|
||||
)
|
||||
)
|
||||
);
|
||||
self::$post_ids = array_merge(
|
||||
self::$post_ids, $factory->post->create_many(
|
||||
2, array(
|
||||
'post_author' => 12345,
|
||||
'post_type' => 'wptests_pt',
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
self::$post_ids[] = $factory->post->create( array(
|
||||
'post_author' => 12345,
|
||||
'post_type' => 'wptests_pt',
|
||||
) );
|
||||
self::$post_ids[] = $factory->post->create(
|
||||
array(
|
||||
'post_author' => 12345,
|
||||
'post_type' => 'wptests_pt',
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
public function setUp() {
|
||||
|
||||
Reference in New Issue
Block a user