Changeset 38052 for trunk/tests/phpunit/tests/media.php
- Timestamp:
- 07/13/2016 03:23:27 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/media.php
r37915 r38052 1323 1323 1324 1324 /** 1325 * @ticket 36549 1326 * @ticket 33641 1327 */ 1328 function test_wp_calculate_image_srcset_with_spaces_in_filenames() { 1329 // Mock data for this test. 1330 $image_src = 'http://' . WP_TESTS_DOMAIN . '/wp-content/uploads/2015/12/test image-300x150.png'; 1331 $image_meta = array( 1332 'width' => 2000, 1333 'height' => 1000, 1334 'file' => '2015/12/test image.png', 1335 'sizes' => array( 1336 'thumbnail' => array( 1337 'file' => 'test image-150x150.png', 1338 'width' => 150, 1339 'height' => 150, 1340 'mime-type' => 'image/png', 1341 ), 1342 'medium' => array( 1343 'file' => 'test image-300x150.png', 1344 'width' => 300, 1345 'height' => 150, 1346 'mime-type' => 'image/png', 1347 ), 1348 'medium_large' => array( 1349 'file' => 'test image-768x384.png', 1350 'width' => 768, 1351 'height' => 384, 1352 'mime-type' => 'image/png', 1353 ), 1354 'large' => array( 1355 'file' => 'test image-1024x512.png', 1356 'width' => 1024, 1357 'height' => 512, 1358 'mime-type' => 'image/png', 1359 ), 1360 ), 1361 ); 1362 1363 $expected_srcset = 'http://' . WP_TESTS_DOMAIN . '/wp-content/uploads/2015/12/test%20image-300x150.png 300w, http://' . WP_TESTS_DOMAIN . '/wp-content/uploads/2015/12/test%20image-768x384.png 768w, http://' . WP_TESTS_DOMAIN . '/wp-content/uploads/2015/12/test%20image-1024x512.png 1024w'; 1364 1365 $this->assertSame( $expected_srcset, wp_calculate_image_srcset( array( 300, 150 ), $image_src, $image_meta ) ); 1366 } 1367 1368 /** 1325 1369 * @ticket 33641 1326 1370 */
Note: See TracChangeset
for help on using the changeset viewer.