Ticket #27282: 27282.diff
| File 27282.diff, 763 bytes (added by , 12 years ago) |
|---|
-
tests/phpunit/tests/post/query.php
666 666 } 667 667 668 668 /** 669 * @group marko 670 */ 671 function test_query_with_sticky_posts() { 672 $post_ids = $this->factory->post->create_many( 10 ); 673 674 stick_post( $post_ids[8] ); 675 676 $query = new WP_Query( array( 677 'orderby' => 'post__in', 678 'post__in' => $post_ids, 679 'posts_per_page' => 3 680 ) ); 681 682 $posts = $query->get_posts(); 683 $this->assertEquals( 3, count( $posts ) ); 684 } 685 686 /** 669 687 * Use with the_posts filter, appends a post and adds some custom data. 670 688 */ 671 689 function the_posts_filter( $posts ) {