From 48e77bd87f1ae1432634888779312b789dbaee55 Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Thu, 23 Oct 2014 01:14:24 +0000 Subject: [PATCH] Generate fewer default posts in wp_list_authors() tests. Saves about 7 seconds when running the suite. See #30017. git-svn-id: https://develop.svn.wordpress.org/trunk@29992 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/user/listAuthors.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/tests/user/listAuthors.php b/tests/phpunit/tests/user/listAuthors.php index 1f907fb778..21282e9bf8 100644 --- a/tests/phpunit/tests/user/listAuthors.php +++ b/tests/phpunit/tests/user/listAuthors.php @@ -28,7 +28,7 @@ class Tests_User_ListAuthors extends WP_UnitTestCase { $this->users[] = $this->factory->user->create( array( 'user_login' => 'paul', 'display_name' => 'paul', 'role' => 'author', 'first_name' => 'paul', 'last_name' => 'norris' ) ); $count = 0; foreach ( $this->users as $userid ) { - $count = $count + 5; + $count = $count + 1; for ( $i = 0; $i < $count; $i++ ) { $this->factory->post->create( array( 'post_type' => 'post', 'post_author' => $userid ) ); } @@ -53,7 +53,7 @@ class Tests_User_ListAuthors extends WP_UnitTestCase { } function test_wp_list_authors_optioncount() { - $expected['optioncount'] = '
  • bob (10)
  • paul (15)
  • zack (5)
  • '; + $expected['optioncount'] = '
  • bob (2)
  • paul (3)
  • zack (1)
  • '; $this->AssertEquals( $expected['optioncount'], wp_list_authors( array( 'echo' => false, 'optioncount' => 1 ) ) ); }