Changeset 55620 for trunk/tests/phpunit/tests/https-detection.php
- Timestamp:
- 04/04/2023 02:54:31 PM (20 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/https-detection.php
r55029 r55620 200 200 * @ticket 47577 201 201 */ 202 public function test_wp_is_local_html_output_via_wlwmanifest_link() {203 remove_action( 'wp_head', 'rsd_link' );204 205 // HTML includes WLW manifest link.206 $head_tag = get_echo( 'wlwmanifest_link' );207 $html = $this->get_sample_html_string( $head_tag );208 $this->assertTrue( wp_is_local_html_output( $html ) );209 210 // HTML includes modified WLW manifest link but same URL.211 $head_tag = str_replace( ' />', '>', get_echo( 'wlwmanifest_link' ) );212 $html = $this->get_sample_html_string( $head_tag );213 $this->assertTrue( wp_is_local_html_output( $html ) );214 215 // HTML includes WLW manifest link with alternative URL scheme.216 $head_tag = get_echo( 'wlwmanifest_link' );217 $head_tag = false !== strpos( $head_tag, 'https://' ) ? str_replace( 'https://', 'http://', $head_tag ) : str_replace( 'http://', 'https://', $head_tag );218 $html = $this->get_sample_html_string( $head_tag );219 $this->assertTrue( wp_is_local_html_output( $html ) );220 221 // HTML does not include WLW manifest link.222 $html = $this->get_sample_html_string();223 $this->assertFalse( wp_is_local_html_output( $html ) );224 }225 226 /**227 * @ticket 47577228 */229 202 public function test_wp_is_local_html_output_via_rest_link() { 230 203 remove_action( 'wp_head', 'rsd_link' ); 231 remove_action( 'wp_head', 'wlwmanifest_link' );232 204 233 205 // HTML includes REST API link. … … 257 229 public function test_wp_is_local_html_output_cannot_determine() { 258 230 remove_action( 'wp_head', 'rsd_link' ); 259 remove_action( 'wp_head', 'wlwmanifest_link' );260 231 remove_action( 'wp_head', 'rest_output_link_wp_head' ); 261 232
Note: See TracChangeset
for help on using the changeset viewer.