Changeset 38383
- Timestamp:
- 08/26/2016 08:50:24 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/media.php
r38302 r38383 10 10 11 11 public static function wpSetUpBeforeClass( $factory ) { 12 self::$_sizes = $GLOBALS['_wp_additional_image_sizes'];12 self::$_sizes = wp_get_additional_image_sizes(); 13 13 $GLOBALS['_wp_additional_image_sizes'] = array(); 14 14 … … 651 651 */ 652 652 function test_add_image_size() { 653 global $_wp_additional_image_sizes; 654 655 if ( ! isset( $_wp_additional_image_sizes ) ) { 656 $_wp_additional_image_sizes = array(); 657 } 653 $_wp_additional_image_sizes = wp_get_additional_image_sizes(); 658 654 659 655 remove_image_size( 'test-size' ); … … 662 658 add_image_size( 'test-size', 200, 600 ); 663 659 664 $sizes = $_wp_additional_image_sizes;660 $sizes = wp_get_additional_image_sizes(); 665 661 666 662 // Clean up … … 978 974 */ 979 975 function test_wp_calculate_image_srcset() { 980 global $_wp_additional_image_sizes;976 $_wp_additional_image_sizes = wp_get_additional_image_sizes(); 981 977 982 978 $year_month = date('Y/m'); … … 1018 1014 */ 1019 1015 function test_wp_calculate_image_srcset_no_date_uploads() { 1020 global $_wp_additional_image_sizes;1016 $_wp_additional_image_sizes = wp_get_additional_image_sizes(); 1021 1017 1022 1018 // Disable date organized uploads … … 1100 1096 */ 1101 1097 function test_wp_calculate_image_srcset_with_absolute_path_in_meta() { 1102 global $_wp_additional_image_sizes;1098 $_wp_additional_image_sizes = wp_get_additional_image_sizes(); 1103 1099 1104 1100 $year_month = date('Y/m'); … … 1376 1372 */ 1377 1373 function test_wp_get_attachment_image_srcset() { 1378 global $_wp_additional_image_sizes;1374 $_wp_additional_image_sizes = wp_get_additional_image_sizes(); 1379 1375 1380 1376 $image_meta = wp_get_attachment_metadata( self::$large_id );
Note: See TracChangeset
for help on using the changeset viewer.