Changeset 52010 for trunk/tests/phpunit/tests/url.php
- Timestamp:
- 11/04/2021 03:22:47 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/url.php
r51568 r52010 8 8 class Tests_URL extends WP_UnitTestCase { 9 9 10 function set_up() {10 public function set_up() { 11 11 parent::set_up(); 12 12 $GLOBALS['pagenow'] = ''; … … 16 16 * @dataProvider data_is_ssl 17 17 */ 18 function test_is_ssl( $value, $expected ) {18 public function test_is_ssl( $value, $expected ) { 19 19 $_SERVER['HTTPS'] = $value; 20 20 … … 23 23 } 24 24 25 function data_is_ssl() {25 public function data_is_ssl() { 26 26 return array( 27 27 array( … … 48 48 } 49 49 50 function test_is_ssl_by_port() {50 public function test_is_ssl_by_port() { 51 51 unset( $_SERVER['HTTPS'] ); 52 52 $_SERVER['SERVER_PORT'] = '443'; … … 56 56 } 57 57 58 function test_is_ssl_with_no_value() {58 public function test_is_ssl_with_no_value() { 59 59 unset( $_SERVER['HTTPS'] ); 60 60 … … 69 69 * @param string $expected Expected result. 70 70 */ 71 function test_admin_url( $url, $expected ) {71 public function test_admin_url( $url, $expected ) { 72 72 $siteurl_http = get_option( 'siteurl' ); 73 73 $admin_url_http = admin_url( $url ); … … 82 82 } 83 83 84 function data_admin_urls() {84 public function data_admin_urls() { 85 85 return array( 86 86 array( … … 137 137 * @param string $expected Expected result. 138 138 */ 139 function test_home_url( $url, $expected ) {139 public function test_home_url( $url, $expected ) { 140 140 $homeurl_http = get_option( 'home' ); 141 141 $home_url_http = home_url( $url ); … … 150 150 } 151 151 152 function data_home_urls() {152 public function data_home_urls() { 153 153 return array( 154 154 array( … … 199 199 } 200 200 201 function test_home_url_from_admin() {201 public function test_home_url_from_admin() { 202 202 // Pretend to be in the site admin. 203 203 set_current_screen( 'dashboard' ); … … 244 244 } 245 245 246 function test_network_home_url_from_admin() {246 public function test_network_home_url_from_admin() { 247 247 // Pretend to be in the site admin. 248 248 set_current_screen( 'dashboard' ); … … 265 265 } 266 266 267 function test_set_url_scheme() {267 public function test_set_url_scheme() { 268 268 $links = array( 269 269 'http://wordpress.org/',
Note: See TracChangeset
for help on using the changeset viewer.