Changeset 34686 for trunk/tests/phpunit/tests/functions/getArchives.php
- Timestamp:
- 09/29/2015 05:10:10 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/functions/getArchives.php
r28960 r34686 89 89 $this->assertEquals( $expected['order_desc'], trim( wp_get_archives( array( 'echo' => false, 'order' => 'DESC' ) ) ) ); 90 90 } 91 92 /** 93 * @ticket 21596 94 */ 95 function test_wp_get_archives_post_type() { 96 register_post_type( 'taco', array( 'public' => true ) ); 97 98 $this->factory->post->create( array( 99 'post_type' => 'taco', 100 'post_author' => '1', 101 'post_date' => '2014-10-23 19:34:42' 102 ) ); 103 104 $oct_url = esc_url( add_query_arg( 'post_type', 'taco', get_month_link( 2014, 10 ) ) ); 105 $expected = "<li><a href='{$oct_url}'>October 2014</a></li>"; 106 $archives = wp_get_archives( array( 'echo' => false, 'post_type' => 'taco' ) ); 107 $this->assertEquals( $expected, trim( $archives ) ); 108 } 91 109 }
Note: See TracChangeset
for help on using the changeset viewer.