Ticket #33041: with-test.diff
File with-test.diff, 1.3 KB (added by , 9 years ago) |
---|
-
src/wp-includes/ms-blogs.php
39 39 */ 40 40 function get_blogaddress_by_id( $blog_id ) { 41 41 $bloginfo = get_blog_details( (int) $blog_id, false ); // only get bare details! 42 return ( $bloginfo ) ? esc_url( 'http://' . $bloginfo->domain . $bloginfo->path) : '';42 return ( $bloginfo ) ? esc_url( set_url_scheme( 'http://' . $bloginfo->domain . $bloginfo->path ) ) : ''; 43 43 } 44 44 45 45 /** -
tests/phpunit/tests/multisite/site.php
1180 1180 } 1181 1181 1182 1182 /** 1183 * Tests returning an address for a given valid id on a https setup 1184 * 1185 * @backupGlobals enabled 1186 */ 1187 function test_get_blogaddress_by_id_with_valid_id_https() { 1188 $_SERVER['HTTPS'] = 'on'; 1189 $blogaddress = get_blogaddress_by_id( 1 ); 1190 $this->assertEquals( 'https://' . WP_TESTS_DOMAIN . '/', $blogaddress ); 1191 } 1192 1193 /** 1183 1194 * Tests returning the appropriate response for a invalid id given. 1184 1195 */ 1185 1196 function test_get_blogaddress_by_id_with_invalid_id() {