Make WordPress Core

Changeset 29992


Ignore:
Timestamp:
10/23/2014 01:14:24 AM (9 years ago)
Author:
boonebgorges
Message:

Generate fewer default posts in wp_list_authors() tests.

Saves about 7 seconds when running the suite.

See #30017.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/user/listAuthors.php

    r28968 r29992  
    2929        $count = 0;
    3030        foreach ( $this->users as $userid ) {
    31             $count = $count + 5;
     31            $count = $count + 1;
    3232            for ( $i = 0; $i < $count; $i++ ) {
    3333                $this->factory->post->create( array( 'post_type' => 'post', 'post_author' => $userid ) );
     
    5454
    5555    function test_wp_list_authors_optioncount() {
    56         $expected['optioncount'] = '<li><a href="' . $this->user_urls[1] . '" title="Posts by bob">bob</a> (10)</li><li><a href="' . $this->user_urls[2] . '" title="Posts by paul">paul</a> (15)</li><li><a href="' . $this->user_urls[0] . '" title="Posts by zack">zack</a> (5)</li>';
     56        $expected['optioncount'] = '<li><a href="' . $this->user_urls[1] . '" title="Posts by bob">bob</a> (2)</li><li><a href="' . $this->user_urls[2] . '" title="Posts by paul">paul</a> (3)</li><li><a href="' . $this->user_urls[0] . '" title="Posts by zack">zack</a> (1)</li>';
    5757        $this->AssertEquals( $expected['optioncount'], wp_list_authors( array( 'echo' => false, 'optioncount' => 1 ) ) );
    5858    }
Note: See TracChangeset for help on using the changeset viewer.