Changeset 28622 for trunk/tests/phpunit/tests/post/query.php
- Timestamp:
- 05/29/2014 08:41:53 PM (12 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/post/query.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/post/query.php
r28621 r28622 742 742 $this->assertEqualSets( $ordered, wp_list_pluck( $attached->posts, 'ID' ) ); 743 743 } 744 745 function test_post_status() { 746 $statuses1 = get_post_stati(); 747 $this->assertContains( 'auto-draft', $statuses1 ); 748 749 $statuses2 = get_post_stati( array( 'exclude_from_search' => true ) ); 750 $this->assertContains( 'auto-draft', $statuses2 ); 751 752 $statuses3 = get_post_stati( array( 'exclude_from_search' => false ) ); 753 $this->assertNotContains( 'auto-draft', $statuses3 ); 754 755 $q1 = new WP_Query( array( 'post_status' => 'any' ) ); 756 $this->assertContains( "post_status <> 'auto-draft'", $q1->request ); 757 758 $q2 = new WP_Query( array( 'post_status' => 'any, auto-draft' ) ); 759 $this->assertNotContains( "post_status <> 'auto-draft'", $q2->request ); 760 761 $q3 = new WP_Query( array( 'post_status' => array( 'any', 'auto-draft' ) ) ); 762 $this->assertNotContains( "post_status <> 'auto-draft'", $q3->request ); 763 } 744 764 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)