Changeset 52010 for trunk/tests/phpunit/tests/link.php
- Timestamp:
- 11/04/2021 03:22:47 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/link.php
r51587 r52010 5 5 class Tests_Link extends WP_UnitTestCase { 6 6 7 function _get_pagenum_link_cb( $url ) {7 public function get_pagenum_link_cb( $url ) { 8 8 return $url . '/WooHoo'; 9 9 } … … 12 12 * @ticket 8847 13 13 */ 14 function test_get_pagenum_link_case_insensitivity() {14 public function test_get_pagenum_link_case_insensitivity() { 15 15 $old_req_uri = $_SERVER['REQUEST_URI']; 16 16 17 17 $this->set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' ); 18 18 19 add_filter( 'home_url', array( $this, ' _get_pagenum_link_cb' ) );19 add_filter( 'home_url', array( $this, 'get_pagenum_link_cb' ) ); 20 20 $_SERVER['REQUEST_URI'] = '/woohoo'; 21 21 $paged = get_pagenum_link( 2 ); 22 22 23 remove_filter( 'home_url', array( $this, ' _get_pagenum_link_cb' ) );23 remove_filter( 'home_url', array( $this, 'get_pagenum_link_cb' ) ); 24 24 $this->assertSame( $paged, home_url( '/WooHoo/page/2/' ) ); 25 25 … … 27 27 } 28 28 29 function test_wp_get_shortlink() {29 public function test_wp_get_shortlink() { 30 30 $post_id = self::factory()->post->create(); 31 31 $post_id2 = self::factory()->post->create(); … … 71 71 } 72 72 73 function test_wp_get_shortlink_with_page() {73 public function test_wp_get_shortlink_with_page() { 74 74 $post_id = self::factory()->post->create( array( 'post_type' => 'page' ) ); 75 75 … … 86 86 * @ticket 26871 87 87 */ 88 function test_wp_get_shortlink_with_home_page() {88 public function test_wp_get_shortlink_with_home_page() { 89 89 $post_id = self::factory()->post->create( array( 'post_type' => 'page' ) ); 90 90 update_option( 'show_on_front', 'page' );
Note: See TracChangeset
for help on using the changeset viewer.