Changeset 52010 for trunk/tests/phpunit/tests/functions/wpGetArchives.php
- Timestamp:
- 11/04/2021 03:22:47 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/functions/wpGetArchives.php
r51568 r52010 10 10 protected $year_url; 11 11 12 function set_up() {12 public function set_up() { 13 13 parent::set_up(); 14 14 … … 27 27 } 28 28 29 function test_wp_get_archives_default() {29 public function test_wp_get_archives_default() { 30 30 $expected['default'] = "<li><a href='" . $this->month_url . "'>" . gmdate( 'F Y' ) . '</a></li>'; 31 31 $this->assertSame( $expected['default'], trim( wp_get_archives( array( 'echo' => false ) ) ) ); 32 32 } 33 33 34 function test_wp_get_archives_type() {34 public function test_wp_get_archives_type() { 35 35 $expected['type'] = "<li><a href='" . $this->year_url . "'>" . gmdate( 'Y' ) . '</a></li>'; 36 36 $this->assertSame( … … 47 47 } 48 48 49 function test_wp_get_archives_limit() {49 public function test_wp_get_archives_limit() { 50 50 $ids = array_slice( array_reverse( self::$post_ids ), 0, 5 ); 51 51 … … 83 83 } 84 84 85 function test_wp_get_archives_format() {85 public function test_wp_get_archives_format() { 86 86 $expected['format'] = "<option value='" . $this->month_url . "'> " . gmdate( 'F Y' ) . ' </option>'; 87 87 $this->assertSame( … … 98 98 } 99 99 100 function test_wp_get_archives_before_and_after() {100 public function test_wp_get_archives_before_and_after() { 101 101 $expected['before_and_after'] = "<div><a href='" . $this->month_url . "'>" . gmdate( 'F Y' ) . '</a></div>'; 102 102 $this->assertSame( … … 115 115 } 116 116 117 function test_wp_get_archives_show_post_count() {117 public function test_wp_get_archives_show_post_count() { 118 118 $expected['show_post_count'] = "<li><a href='" . $this->month_url . "'>" . gmdate( 'F Y' ) . '</a> (8)</li>'; 119 119 $this->assertSame( … … 130 130 } 131 131 132 function test_wp_get_archives_echo() {132 public function test_wp_get_archives_echo() { 133 133 $expected['echo'] = "\t<li><a href='" . $this->month_url . "'>" . gmdate( 'F Y' ) . '</a></li>' . "\n"; 134 134 $this->expectOutputString( $expected['echo'] ); … … 136 136 } 137 137 138 function test_wp_get_archives_order() {138 public function test_wp_get_archives_order() { 139 139 self::factory()->post->create( 140 140 array( … … 183 183 * @ticket 21596 184 184 */ 185 function test_wp_get_archives_post_type() {185 public function test_wp_get_archives_post_type() { 186 186 register_post_type( 'taco', array( 'public' => true ) ); 187 187
Note: See TracChangeset
for help on using the changeset viewer.