Changeset 27803
- Timestamp:
- 03/28/2014 03:01:43 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/link.php
r27692 r27803 98 98 99 99 /** 100 * @ticket 26871 101 */ 102 function test_wp_get_shortlink_with_home_page() { 103 $post_id = $this->factory->post->create( array( 'post_type' => 'page' ) ); 104 update_option( 'show_on_front', 'page' ); 105 update_option( 'page_on_front', $post_id ); 106 107 $this->assertEquals( home_url( '/' ), wp_get_shortlink( $post_id, 'post' ) ); 108 109 global $wp_rewrite; 110 $wp_rewrite->permalink_structure = ''; 111 $wp_rewrite->set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' ); 112 $wp_rewrite->flush_rules(); 113 114 $this->assertEquals( home_url( '/' ), wp_get_shortlink( $post_id, 'post' ) ); 115 116 $wp_rewrite->set_permalink_structure( '' ); 117 $wp_rewrite->flush_rules(); 118 } 119 120 /** 100 121 * @ticket 17807 101 122 */
Note: See TracChangeset
for help on using the changeset viewer.