Changeset 57020 for branches/6.4/tests/phpunit/tests/media.php
- Timestamp:
- 10/27/2023 06:34:11 PM (11 months ago)
- Location:
- branches/6.4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/6.4
-
branches/6.4/tests/phpunit/tests/media.php
r56694 r57020 80 80 */ 81 81 public function tear_down() { 82 global $_wp_current_template_id, $_wp_current_template_content; 83 unset( $_wp_current_template_id, $_wp_current_template_content ); 84 82 85 parent::tear_down(); 83 86 … … 3973 3976 */ 3974 3977 public function test_wp_filter_content_tags_does_not_lazy_load_first_image_in_block_theme() { 3975 global $_wp_current_template_ content, $wp_query, $wp_the_query, $post;3978 global $_wp_current_template_id, $_wp_current_template_content, $wp_query, $wp_the_query, $post; 3976 3979 3977 3980 // Do not add srcset, sizes, or decoding attributes as they are irrelevant for this test. … … 4002 4005 $post = get_post( self::$post_ids['publish'] ); 4003 4006 4007 // Force a template ID that is for the current stylesheet. 4008 $_wp_current_template_id = get_stylesheet() . '//single'; 4004 4009 $_wp_current_template_content = '<!-- wp:post-content /-->'; 4005 4010 … … 4021 4026 */ 4022 4027 public function test_wp_filter_content_tags_does_not_lazy_load_first_featured_image_in_block_theme() { 4023 global $_wp_current_template_ content, $wp_query, $wp_the_query, $post;4028 global $_wp_current_template_id, $_wp_current_template_content, $wp_query, $wp_the_query, $post; 4024 4029 4025 4030 // Do not add srcset, sizes, or decoding attributes as they are irrelevant for this test. … … 4070 4075 $post = get_post( self::$post_ids['publish'] ); 4071 4076 4077 // Force a template ID that is for the current stylesheet. 4078 $_wp_current_template_id = get_stylesheet() . '//single'; 4072 4079 $_wp_current_template_content = '<!-- wp:post-featured-image /--> <!-- wp:post-content /-->'; 4073 4080 … … 4088 4095 */ 4089 4096 public function test_wp_filter_content_tags_does_not_lazy_load_images_in_header() { 4090 global $_wp_current_template_ content;4097 global $_wp_current_template_id, $_wp_current_template_content; 4091 4098 4092 4099 // Do not add srcset, sizes, or decoding attributes as they are irrelevant for this test. … … 4123 4130 wp_set_post_terms( $footer_post_id, get_stylesheet(), 'wp_theme' ); 4124 4131 4132 // Force a template ID that is for the current stylesheet. 4133 $_wp_current_template_id = get_stylesheet() . '//single'; 4125 4134 $_wp_current_template_content = '<!-- wp:template-part {"slug":"header","theme":"' . get_stylesheet() . '","tagName":"header"} /--><!-- wp:template-part {"slug":"footer","theme":"' . get_stylesheet() . '","tagName":"footer"} /-->'; 4126 4135
Note: See TracChangeset
for help on using the changeset viewer.