Changeset 1056 in tests for trunk/tests/comment.php
- Timestamp:
- 09/27/2012 06:08:54 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/comment.php
r1035 r1056 1 1 <?php 2 3 // Test the output of Comment Querying functions4 5 /**6 * @group comment7 */8 class Test_Comment_Query extends WP_UnitTestCase {9 var $comment_id;10 11 function setUp() {12 parent::setUp();13 14 $this->comment_id = $this->factory->comment->create();15 }16 17 /**18 * @ticket 2110119 */20 function test_get_comment_comment_approved_0() {21 $comments_approved_0 = get_comments( array( 'comment_approved' => '0' ) );22 $this->assertEquals( 0, count( $comments_approved_0 ) );23 }24 25 /**26 * @ticket 2110127 */28 function test_get_comment_comment_approved_1() {29 $comments_approved_1 = get_comments( array( 'comment_approved' => '1' ) );30 31 $this->assertEquals( 1, count( $comments_approved_1 ) );32 $result = $comments_approved_1[0];33 34 $this->assertEquals( $this->comment_id, $result->comment_ID );35 }36 }37 2 38 3 /**
Note: See TracChangeset
for help on using the changeset viewer.