Changeset 1034 in tests for trunk/tests/url.php
- Timestamp:
- 09/21/2012 12:38:00 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/tests/url.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/url.php
r1001 r1034 153 153 $this->assertEquals( $home, home_url() ); 154 154 155 156 // Test with https in home 157 update_option( 'home', set_url_scheme( $home, 'https' ) ); 158 159 // Pretend to be in the site admin 160 set_current_screen( 'dashboard' ); 161 $home = get_option('home'); 162 163 // home_url() should return whatever scheme is set in the home option when in the admin 164 $_SERVER['HTTPS'] = 'on'; 165 $this->assertEquals( $home, home_url() ); 166 167 $_SERVER['HTTPS'] = 'off'; 168 $this->assertEquals( $home, home_url() ); 169 170 // If not in the admin, is_ssl() should determine the scheme unless https hard-coded in home 171 set_current_screen( 'front' ); 172 $this->assertEquals( $home, home_url() ); 173 $_SERVER['HTTPS'] = 'on'; 174 $this->assertEquals( $home, home_url() ); 175 $_SERVER['HTTPS'] = 'off'; 176 $this->assertEquals( $home, home_url() ); 177 178 update_option( 'home', set_url_scheme( $home, 'http' ) ); 179 155 180 $GLOBALS['current_screen'] = $screen; 156 181 }
Note: See TracChangeset
for help on using the changeset viewer.