From fa76c19ecb149b608517341d40b828230773dcb4 Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Sat, 22 Nov 2014 15:04:07 +0000 Subject: [PATCH] Declare user_email when setting up fixtures for `count_user_posts()` tests. Because `setUpBeforeClass()` is called statically and creates its own factory object, the iterator logic from previous tests is not carried over to these fixtures, and we risk the possibility of user_email clashes when the tests are run in certain limited configurations. git-svn-id: https://develop.svn.wordpress.org/trunk@30512 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/user/countUserPosts.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/phpunit/tests/user/countUserPosts.php b/tests/phpunit/tests/user/countUserPosts.php index 2d232e815c..4a1746dec8 100644 --- a/tests/phpunit/tests/user/countUserPosts.php +++ b/tests/phpunit/tests/user/countUserPosts.php @@ -14,6 +14,7 @@ class Tests_User_CountUserPosts extends WP_UnitTestCase { 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(