Changeset 29992
- Timestamp:
- 10/23/2014 01:14:24 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/user/listAuthors.php
r28968 r29992 29 29 $count = 0; 30 30 foreach ( $this->users as $userid ) { 31 $count = $count + 5;31 $count = $count + 1; 32 32 for ( $i = 0; $i < $count; $i++ ) { 33 33 $this->factory->post->create( array( 'post_type' => 'post', 'post_author' => $userid ) ); … … 54 54 55 55 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>'; 57 57 $this->AssertEquals( $expected['optioncount'], wp_list_authors( array( 'echo' => false, 'optioncount' => 1 ) ) ); 58 58 }
Note: See TracChangeset
for help on using the changeset viewer.