Changeset 1059 in tests
- Timestamp:
- 10/01/2012 03:32:11 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/tests/comment/query.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/comment/query.php
r1058 r1059 112 112 $this->assertEquals( 1, count( $comments ) ); 113 113 } 114 115 function test_get_status() { 116 $post_id = $this->factory->post->create(); 117 $this->factory->comment->create_post_comments( $post_id, 10 ); 118 119 $post_id2 = $this->factory->post->create(); 120 $this->factory->comment->create_post_comments( $post_id2, 10 ); 121 122 $post_id3 = $this->factory->post->create(); 123 $this->factory->comment->create_post_comments( $post_id3, 10, array( 'comment_approved' => '0' ) ); 124 125 $post_id4 = $this->factory->post->create(); 126 $this->factory->comment->create_post_comments( $post_id4, 10, array( 'comment_approved' => 'trash' ) ); 127 128 $post_id5 = $this->factory->post->create(); 129 $this->factory->comment->create_post_comments( $post_id5, 10, array( 'comment_approved' => 'spam' ) ); 130 131 $this->assertEquals( 30, count( get_comments() ) ); 132 $this->assertEquals( 30, count( get_comments( array( 'status' => 'all' ) ) ) ); 133 $this->assertEquals( 20, count( get_comments( array( 'status' => 'approve' ) ) ) ); 134 $this->assertEquals( 10, count( get_comments( array( 'status' => 'hold' ) ) ) ); 135 $this->assertEquals( 10, count( get_comments( array( 'status' => 'trash' ) ) ) ); 136 $this->assertEquals( 10, count( get_comments( array( 'status' => 'spam' ) ) ) ); 137 } 114 138 }
Note: See TracChangeset
for help on using the changeset viewer.