|
@@ 1189-1194 (lines=6) @@
|
| 1186 |
|
// Add the full size width at the end. |
| 1187 |
|
$expected .= $uploads_dir_url . $image_meta['file'] . ' ' . $image_meta['width'] .'w'; |
| 1188 |
|
|
| 1189 |
|
foreach ( $intermediates as $int ) { |
| 1190 |
|
$image_url = wp_get_attachment_image_url(self::$large_id, $int); |
| 1191 |
|
$size_array = $this->_get_image_size_array_from_meta($image_meta, $int); |
| 1192 |
|
$expected_srcset = $this->_src_first($expected, $image_url, $size_array[0]); |
| 1193 |
|
$this->assertSame($expected_srcset, wp_calculate_image_srcset($size_array, $image_url, $image_meta)); |
| 1194 |
|
} |
| 1195 |
|
} |
| 1196 |
|
|
| 1197 |
|
/** |
|
@@ 1235-1240 (lines=6) @@
|
| 1232 |
|
// Add the full size width at the end. |
| 1233 |
|
$expected .= $uploads_dir_url . $image_meta['file'] . ' ' . $image_meta['width'] .'w'; |
| 1234 |
|
|
| 1235 |
|
foreach ( $intermediates as $int ) { |
| 1236 |
|
$size_array = $this->_get_image_size_array_from_meta($image_meta, $int); |
| 1237 |
|
$image_url = wp_get_attachment_image_url($id, $int); |
| 1238 |
|
$expected_srcset = $this->_src_first($expected, $image_url, $size_array[0]); |
| 1239 |
|
$this->assertSame($expected_srcset, wp_calculate_image_srcset($size_array, $image_url, $image_meta)); |
| 1240 |
|
} |
| 1241 |
|
|
| 1242 |
|
// Remove the attachment |
| 1243 |
|
wp_delete_attachment($id); |
|
@@ 1317-1322 (lines=6) @@
|
| 1314 |
|
// Prepend an absolute path to simulate a pre-2.7 upload |
| 1315 |
|
$image_meta['file'] = 'H:\home\wordpress\trunk/wp-content/uploads/' . $image_meta['file']; |
| 1316 |
|
|
| 1317 |
|
foreach ( $intermediates as $int ) { |
| 1318 |
|
$image_url = wp_get_attachment_image_url(self::$large_id, $int); |
| 1319 |
|
$size_array = $this->_get_image_size_array_from_meta($image_meta, $int); |
| 1320 |
|
$expected_srcset = $this->_src_first($expected, $image_url, $size_array[0]); |
| 1321 |
|
$this->assertSame($expected_srcset, wp_calculate_image_srcset($size_array, $image_url, $image_meta)); |
| 1322 |
|
} |
| 1323 |
|
} |
| 1324 |
|
|
| 1325 |
|
/** |