Changeset 45424 for trunk/tests/phpunit/tests/functions/getArchives.php
- Timestamp:
- 05/26/2019 12:11:37 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/functions/getArchives.php
r43571 r45424 16 16 parent::setUp(); 17 17 18 $this->month_url = get_month_link( date( 'Y' ),date( 'm' ) );19 $this->year_url = get_year_link( date( 'Y' ) );18 $this->month_url = get_month_link( gmdate( 'Y' ), gmdate( 'm' ) ); 19 $this->year_url = get_year_link( gmdate( 'Y' ) ); 20 20 } 21 21 … … 31 31 32 32 function test_wp_get_archives_default() { 33 $expected['default'] = "<li><a href='" . $this->month_url . "'>" . date( 'F Y' ) . '</a></li>';33 $expected['default'] = "<li><a href='" . $this->month_url . "'>" . gmdate( 'F Y' ) . '</a></li>'; 34 34 $this->assertEquals( $expected['default'], trim( wp_get_archives( array( 'echo' => false ) ) ) ); 35 35 } 36 36 37 37 function test_wp_get_archives_type() { 38 $expected['type'] = "<li><a href='" . $this->year_url . "'>" . date( 'Y' ) . '</a></li>';38 $expected['type'] = "<li><a href='" . $this->year_url . "'>" . gmdate( 'Y' ) . '</a></li>'; 39 39 $this->assertEquals( 40 40 $expected['type'], … … 87 87 88 88 function test_wp_get_archives_format() { 89 $expected['format'] = "<option value='" . $this->month_url . "'> " . date( 'F Y' ) . ' </option>';89 $expected['format'] = "<option value='" . $this->month_url . "'> " . gmdate( 'F Y' ) . ' </option>'; 90 90 $this->assertEquals( 91 91 $expected['format'], … … 102 102 103 103 function test_wp_get_archives_before_and_after() { 104 $expected['before_and_after'] = "<div><a href='" . $this->month_url . "'>" . date( 'F Y' ) . '</a></div>';104 $expected['before_and_after'] = "<div><a href='" . $this->month_url . "'>" . gmdate( 'F Y' ) . '</a></div>'; 105 105 $this->assertEquals( 106 106 $expected['before_and_after'], … … 119 119 120 120 function test_wp_get_archives_show_post_count() { 121 $expected['show_post_count'] = "<li><a href='" . $this->month_url . "'>" . date( 'F Y' ) . '</a> (8)</li>';121 $expected['show_post_count'] = "<li><a href='" . $this->month_url . "'>" . gmdate( 'F Y' ) . '</a> (8)</li>'; 122 122 $this->assertEquals( 123 123 $expected['show_post_count'], … … 134 134 135 135 function test_wp_get_archives_echo() { 136 $expected['echo'] = "\t<li><a href='" . $this->month_url . "'>" . date( 'F Y' ) . '</a></li>' . "\n";136 $expected['echo'] = "\t<li><a href='" . $this->month_url . "'>" . gmdate( 'F Y' ) . '</a></li>' . "\n"; 137 137 $this->expectOutputString( $expected['echo'] ); 138 138 wp_get_archives( array( 'echo' => true ) ); … … 148 148 ); 149 149 150 $date_full = date( 'F Y' );150 $date_full = gmdate( 'F Y' ); 151 151 $oct_url = get_month_link( 2012, 10 ); 152 152 $expected['order_asc'] = <<<EOF
Note: See TracChangeset
for help on using the changeset viewer.