Changeset 36711 for trunk/tests/phpunit/tests/rewrite.php
- Timestamp:
- 02/25/2016 09:17:34 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rewrite.php
r36307 r36711 106 106 // Save server data for cleanup 107 107 $is_ssl = is_ssl(); 108 $http_host = $_SERVER['HTTP_HOST'];109 108 110 109 $_SERVER['HTTPS'] = 'on'; 111 110 112 $post_id = self::factory()->post->create();113 $p ermalink = get_permalink( $post_id );114 $ this->assertEquals( $post_id, url_to_postid( set_url_scheme( $permalink, 'http' )) );115 116 $p ost_id= self::factory()->post->create( array( 'post_type' => 'page' ) );117 $p ermalink = get_permalink( $post_id );118 $ this->assertEquals( $post_id, url_to_postid( set_url_scheme( $permalink, 'http' )) );111 $post_id = self::factory()->post->create(); 112 $post_permalink = get_permalink( $post_id ); 113 $post_url_to_id = url_to_postid( set_url_scheme( $post_permalink, 'http' ) ); 114 115 $page_id = self::factory()->post->create( array( 'post_type' => 'page' ) ); 116 $page_permalink = get_permalink( $page_id ); 117 $page_url_to_id = url_to_postid( set_url_scheme( $page_permalink, 'http' ) ); 119 118 120 119 // Cleanup. 121 120 $_SERVER['HTTPS'] = $is_ssl ? 'on' : 'off'; 122 $_SERVER['HTTP_HOST'] = $http_host; 121 122 $this->assertEquals( $post_id, $post_url_to_id ); 123 $this->assertEquals( $page_id, $page_url_to_id ); 123 124 } 124 125
Note: See TracChangeset
for help on using the changeset viewer.