diff --git tests/phpunit/tests/media.php tests/phpunit/tests/media.php
index 55a53a1..bbce06d 100644
|
|
|
EOF; |
| 1059 | 1059 | } |
| 1060 | 1060 | |
| 1061 | 1061 | /** |
| | 1062 | * When we're rendering a 'srcset' for responsive images we're relying on the wp-image-* class name, |
| | 1063 | * but the class name may not be consistent with attachment IDs when working with imported content |
| | 1064 | * or when editing the src attribute manually. This can result in different images shown on different |
| | 1065 | * screen sizes or screen densities. |
| | 1066 | * |
| | 1067 | * @ticket 34898 |
| | 1068 | * @ticket 33641 |
| | 1069 | */ |
| | 1070 | function test_wp_make_content_images_responsive_wrong() { |
| | 1071 | $image = get_image_tag( self::$large_id, '', '', '', 'medium' ); |
| | 1072 | |
| | 1073 | // Replace the src URL |
| | 1074 | $image_wrong_src = preg_replace( '|src="[^"]+"|', 'src="http://' . WP_TESTS_DOMAIN . '/wp-content/uploads/foo.jpg"', $image ); |
| | 1075 | |
| | 1076 | $this->assertSame( $image_wrong_src, wp_make_content_images_responsive( $image_wrong_src) ); |
| | 1077 | } |
| | 1078 | |
| | 1079 | /** |
| 1062 | 1080 | * @ticket 33641 |
| 1063 | 1081 | */ |
| 1064 | 1082 | function test_wp_make_content_images_responsive_with_preexisting_srcset() { |