- Timestamp:
- 10/16/2015 09:04:12 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/comment/getCommentsPagesCount.php
r34561 r35225 39 39 function test_empty() { 40 40 //setup post and comments 41 $post_id = $this->factory->post->create( array( 'post_title' => 'comment--post', 'post_type' => 'post' ) );41 $post_id = self::$factory->post->create( array( 'post_title' => 'comment--post', 'post_type' => 'post' ) ); 42 42 $this->go_to( '/?p=' . $post_id ); 43 43 … … 61 61 function test_threaded_comments( ) { 62 62 //setup post and comments 63 $post = $this->factory->post->create_and_get( array( 'post_title' => 'comment--post', 'post_type' => 'post' ) );64 $comments = $this->factory->comment->create_post_comments( $post->ID, 15 );65 $this->factory->comment->create_post_comments( $post->ID, 6, array( 'comment_parent' => $comments[0] ) );63 $post = self::$factory->post->create_and_get( array( 'post_title' => 'comment--post', 'post_type' => 'post' ) ); 64 $comments = self::$factory->comment->create_post_comments( $post->ID, 15 ); 65 self::$factory->comment->create_post_comments( $post->ID, 6, array( 'comment_parent' => $comments[0] ) ); 66 66 $comments = get_comments( array( 'post_id' => $post->ID ) ); 67 67 … … 77 77 78 78 //setup post and comments 79 $post = $this->factory->post->create_and_get( array( 'post_title' => 'comment--post', 'post_type' => 'post' ) );80 $comments = $this->factory->comment->create_post_comments( $post->ID, 15 );81 $this->factory->comment->create_post_comments( $post->ID, 6, array('comment_parent' => $comments[0] ) );79 $post = self::$factory->post->create_and_get( array( 'post_title' => 'comment--post', 'post_type' => 'post' ) ); 80 $comments = self::$factory->comment->create_post_comments( $post->ID, 15 ); 81 self::$factory->comment->create_post_comments( $post->ID, 6, array('comment_parent' => $comments[0] ) ); 82 82 $comments = get_comments( array( 'post_id' => $post->ID ) ); 83 83 … … 105 105 update_option( 'posts_per_rss', 100 ); 106 106 107 $post = $this->factory->post->create_and_get( array( 'post_title' => 'comment-post', 'post_type' => 'post' ) );108 $comments = $this->factory->comment->create_post_comments( $post->ID, 25 );107 $post = self::$factory->post->create_and_get( array( 'post_title' => 'comment-post', 'post_type' => 'post' ) ); 108 $comments = self::$factory->comment->create_post_comments( $post->ID, 25 ); 109 109 110 110 $wp_query = new WP_Query( array( 'p' => $post->ID, 'comments_per_page' => 10, 'feed' =>'comments-' ) );
Note: See TracChangeset
for help on using the changeset viewer.