Changeset 1323 in tests
- Timestamp:
- 07/28/2013 09:35:18 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/post.php
r1307 r1323 695 695 $this->assertEquals( array( 'Page 0' ), $pages ); 696 696 } 697 698 /** 699 * @ticket 24803 700 */ 701 function test_wp_count_posts() { 702 $post_type = rand_str(20); 703 register_post_type( $post_type ); 704 $this->factory->post->create( array( 705 'post_type' => $post_type, 706 'post_author' => $this->author_id 707 ) ); 708 $count = wp_count_posts( $post_type, 'readable' ); 709 $this->assertEquals( 1, $count->publish ); 710 _unregister_post_type( $post_type ); 711 $this->assertEquals( new stdClass, wp_count_posts( $post_type, 'readable' ) ); 712 } 697 713 }
Note: See TracChangeset
for help on using the changeset viewer.